I have a database with a few columns that store height data in the following format...

8 ft 4 in

5 ft 1 in

8 ft 6 in

12 ft 0 in

and so forth, for a total of more than 20,000 records spread across three columns. I need to do this conversion to decimal feet using either a VBA module or an excel formula. I don't know where I'm going wrong, but I've modified another VBA script I used to convert coordinates specified in degrees minutes seconds to decimal degrees

```Function ConvertFtInches(pInput As String) As Double
'Updateby20140227
Dim xFt As Double
Dim xIn As Double
xFt = Val(Left(pInput, InStr(1, pInput, " ft") - 1))
xIn = Val(Mid(pInput, InStr(1, pInput, " ft") + 2, _
InStr(1, pInput, " in") - InStr(1, pInput, _
" ft") - 2)) / 12
ConvertFtInches = xFt + xIn
End Function```

As a rookie with VBA, I could be completely wrong. Given that it is an adaption from another script, there is undoubtedly a problem with the script. There might be a simpler Excel formula available.

I'm hoping someone can assist. The conversions for values that are not formatted similarly to mine are included in all the other discussions.

Nov 2, 2022 in Others 486 views

## Converting Textboxes Link and/or Formula to Values in a Copied Sheet using Excel VBA

Copy the values using Range and Value2 With ActiveSheet.UsedRange ...READ MORE

## MS EXCEL: Convert (Height) Decimal Feet & Inches to Inches Only

Using MS Excel (2010), I would like ...READ MORE

## In Excel Sheet how to Eliminate or Remove, Filter and copy the selected records defined in another sheet using dynamic array list (VBA Module)

I'm attempting to generate an Excel sheet ...READ MORE

## What is the shortest formula in excel to covert text date format e.g. 17 Jan, 2023 into regular date format like 1/17/2023?

The SUBSTITUTE() method can be used to ...READ MORE

## Excel-VBA - How to identify Target range (more than 1 cell) is deleted in a Worksheet_Change function?

You misunderstand the purpose of the function ...READ MORE

## How to print an Excel Sheet using VBA with Nitro PDF Creator in Excel 2016

you can use the built-in excel facilities ...READ MORE

## Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

## Remove formulas from all worksheets in Excel using VBA

Try this : Option Explicit Sub test1() ...READ MORE