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
 
If your values always have the foot and inch parts, even it they are 0 (for example, 0'-4" or 5'-0"), then this formula would also work...

=SUM(INDEX(TEXTSPLIT(G46,{"'","""","-"}),,{1,3})/{1,12})

If you could have just the foot value without the dash/inches part, then use this formula instead...

=SUM(INDEX(TEXTSPLIT(G46&"-0",{"'","""","-"}),,{1,3})/{1,12})
 
Last edited:
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
If your values always have the foot and inch parts, even it they are 0 (for example, 0'-4" or 5'-0"), then this formula would also work...

=SUM(INDEX(TEXTSPLIT(G46,{"'","""","-"}),,{1,3})/{1,12})

If you could have just the foot value without the dash/inches part, then use this formula instead...
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.
IT updated me, all good now.
Thanks
 
Upvote 0

Forum statistics

Threads
1,215,373
Messages
6,124,549
Members
449,170
Latest member
Gkiller

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