Convert and display feet, inches and fractions in excel

SirSquiddly

New Member
Joined
Jun 26, 2018
Messages
40
Hi folks

I understand there are several forums on this or similar but I am having a nightmare with it.

I have values displayed in decimal feet which I have converted to metres with no issues, but I now have to display this in inches and fractions as well as feet, inches and fractions. I have managed to get the conversion but cant simplify the fractions E.g., 16/32 is displayed but I would like it to = 1/2 but go to 32nds so there could be 7 5/32

for feet and inches and fractions I have edited a formula I found:

=INT('Decimal Feet'!D10)&"'"&IF(('Decimal Feet'!D10-INT('Decimal Feet'!D10))," - "&INT(('Decimal Feet'!D10-INT('Decimal Feet'!D10))*12)&IF((('Decimal Feet'!D10-INT('Decimal Feet'!D10))*12)-INT(('Decimal Feet'!D10-INT('Decimal Feet'!D10))*12),TEXT((('Decimal Feet'!D10-INT('Decimal Feet'!D10))*12)-INT(('Decimal Feet'!D10-INT('Decimal Feet'!D10))*12)," ?/32"),"")&"""","")

For inches:

='Feet and inches (2)'!


Open to other options and any help much appreciated.

Thanks


 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Use MROUND() with TEXT() formating will solve fraction display issue.

Phh
 
Upvote 0
Here is formula to convert from decimal inches to imperial fraction round-off 1/64:
Excel Formula:
=IF(NOT(ISNUMBER(A1)),"n/a",
 IF(OR(MROUND(A1,SIGN(A1)*1/64)>=12,MROUND(A1,SIGN(A1)*1/64)<=-12),
 ROUNDDOWN(MROUND(A1,SIGN(A1)*1/64)/12,0)&"'-"&TEXT(MOD(MROUND(ABS(A1),1/64),12),"0 #/##")&"""",
 TEXT(MROUND(A1,SIGN(A1)*1/64),"# #/##")&""""))

Btw, formula above can perform convert negative number!

Also, if you want to use with LAMBDA() function:
Excel Formula:
=LAMBDA(in,
 IF(NOT(ISNUMBER(in)),"n/a",
 IF(OR(MROUND(in,SIGN(in)*1/64)>=12,MROUND(in,SIGN(in)*1/64)<=-12),
 ROUNDDOWN(MROUND(in,SIGN(in)*1/64)/12,0)&"'-"&TEXT(MOD(MROUND(ABS(in),1/64),12),"0 #/##")&"""",
 TEXT(MROUND(in,SIGN(in)*1/64),"# #/##")&""""))
 )

Cheer!

Phh
 
Upvote 0
Formula to convert from decimal feet to imperial fraction round-off 1/64:
Excel Formula:
=IF(NOT(ISNUMBER(A1)),"n/a",
 IF(OR(MROUND(A1*12,SIGN(A1)*1/64)>=12,MROUND(A1*12,SIGN(A1)*1/64)<=-12),
 ROUNDDOWN(MROUND(A1*12,SIGN(A1)*1/64)/12,0)&"'-"&TEXT(MOD(MROUND(ABS(A1*12),1/64),12),"0 #/##")&"""",
 TEXT(MROUND(A1*12,SIGN(A1)*1/64),"# #/##")&""""))

Note: regarding text rounding, the denominator number is importance and must match with number of rounding, ex. 1/2, 1/8 -> #/# ; 1/16, 1/32, 1/64 -> #/## ; 1/4096 -> #/####, etc.

Phh
 
Upvote 0
Similar to decimal feet conversion on previous post, reuse formula with slight modification
for convert from decimal meter to imperial fraction round-off 1/64:

Excel Formula:
=IF(NOT(ISNUMBER(A1)),"n/a",
 IF(OR(MROUND(A1/.0254,SIGN(A1)*1/64)>=12,MROUND(A1/.0254,SIGN(A1)*1/64)<=-12),
 ROUNDDOWN(MROUND(A1/.0254,SIGN(A1)*1/64)/12,0)&"'-"&TEXT(MOD(MROUND(ABS(A1/.0254),1/64),12),"0 #/##")&"""",
 TEXT(MROUND(A1/.0254,SIGN(A1)*1/64),"# #/##")&""""))

Phh
 
Upvote 1

Forum statistics

Threads
1,214,834
Messages
6,121,871
Members
449,054
Latest member
juliecooper255

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