Convert a dimesion to decimal?

jrisebo

Active Member
Joined
Mar 15, 2011
Messages
312
Office Version
  1. 365
Platform
  1. Windows
How would you convert 5'-6" to 5.5? I have this, but always get 5
VBA Code:
=IFERROR(--LEFT(G46,FIND("'",G46)-1),0)+IFERROR(--SUBSTITUTE(IFERROR(MID(G46,FIND("'",G46)+1,2),G46),CHAR(34),""),0)/12
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try this:
Excel Formula:
=TEXTBEFORE(G46,"'")+IFERROR(SUBSTITUTE(TEXTAFTER(G46,"-"),CHAR(34),"")/12,0)

I added an error command to handle a situation where maybe you have no inches, like:
5'
 
Upvote 0
Edit: Better use Joe's suggestion.

Maybe this:

Book1
AB
15'-6"5.5
24'-3"4.25
310'-11"10.91667
Sheet2
Cell Formulas
RangeFormula
B1:B3B1=TEXTBEFORE(A1,"'")+TEXTAFTER(SUBSTITUTE(A1,"""",""),"-")/12
 
Upvote 0
Try this:
Excel Formula:
=TEXTBEFORE(G46,"'")+IFERROR(SUBSTITUTE(TEXTAFTER(G46,"-"),CHAR(34),"")/12,0)

I added an error command to handle a situation where maybe you have no inches, like:
5'
I get a #name? error.
 
Upvote 0
I get a #name? error.
Are you using Office 365 like your profile shows?
1701373885129.png
 
Upvote 0
Im on Microsoft 365 apps for enterprise. I dont know what version of excel.
Edit - 2202 Build 14931.20858
Could be build 2208 and newer. That's about all I can find by googling. But it seems more folks earlier on build 2202 had similar issues and others on 2210 did not.

The link is to a Microsoft support forum post showing the build 2208 I am referring to.


Edit: further confirmation:
1701374531498.png
 
Upvote 0
Could be build 2208 and newer. That's about all I can find by googling. But it seems more folks earlier on build 2202 had similar issues and others on 2210 did not.

my online version of excel has it (if I log into 365). But what they installed on my system does not. Ugh
But, I know how to do it now, I can wait a few days or whatever for them to update it.
 
Upvote 0
Im on Microsoft 365 apps for enterprise. I dont know what version of excel.
Edit - 2202 Build 14931.20858
It looks like that build is a year old, from December 2022, and is on the Semi Annual channel.
So it would seem that you have some updates to apply. If you do, I think you should get access to all the latest and greatest functions.
 
Upvote 0
It looks like that build is a year old, from December 2022, and is on the Semi Annual channel.
So it would seem that you have some updates to apply. If you do, I think you should get access to all the latest and greatest functions.
I guess I will ask my IT department
 
Upvote 0

Forum statistics

Threads
1,215,356
Messages
6,124,471
Members
449,163
Latest member
kshealy

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