Converting 12'10" and 7' into just inches using an excel formula

fryingpan

New Member
Joined
Apr 7, 2016
Messages
5
I have exported data that has text values in feet and inches. The format is X'Y" unless the number is whole feet in which case it is just X'. I would like to convert to inches.

I have tired the following but it doesn't work when there are is not an inch value present. An example of this would be 7'.

=(LEFT(B1,FIND("'",B1,1)-1))*12+(MID(B1,FIND("'",B1,1)+1,LEN(B1)-FIND("'",B1,1)-1))

Thanks for the help
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Welcome to the forum.

Maybe something like this?

ABC
17'11"95
27'84
311'4"136
41' 3"15
54'48
65'0"60

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet7

Worksheet Formulas
CellFormula
C1=LEFT(B1,FIND("'",B1)-1)*12+("0"&TRIM(SUBSTITUTE(MID(B1,FIND("'",B1)+1,3),"""","")))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Here is another formula (shorter, less function calls) that you can also use...

=12*TRIM(SUBSTITUTE(SUBSTITUTE(B1,"'"," "),"""","/12"))
 
Upvote 0
Glad we could help.

Rick, that's very clever. I often forget that Excel allows you to enter fractions.
 
Upvote 0

Forum statistics

Threads
1,215,179
Messages
6,123,495
Members
449,100
Latest member
sktz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top