Number into feet and inches

Status
Not open for further replies.

D Waggs

Board Regular
Joined
Jun 7, 2004
Messages
61
I have a number as a decimal in feet and I want that number in feet and inches with the inches in a fraction. I have a formula for getting the number into a 16th fraction

=IF(MOD(INT(16*(+B4-INT(B4)+0.0312)),16)=0,TEXT(B4,"#"),IF(MOD(INT(16*(+B4-INT(B4)+0.0312)),8)=0,TEXT(B4,"# 0/2"),IF(MOD(INT(16*(+B4-INT(B4)+0.0312)),4)=0,TEXT(B4,"# 0/4"),IF(MOD(INT(16*(+B4-INT(B4)+0.0312)),2)=0,TEXT(B4,"# 0/8"),TEXT(B4,"# 0/16")))))

If I enter the number, say 325.28 into A1, I want 325 to show up in A2 and then 3 3/8 to show up in A3. The formula above will take 3.36 (which is .28*12 and display the 3 3/8), I just need to seperate the decimal from the larger number, multiply it by 12 and apply the formula above all in one cell.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Status
Not open for further replies.

Forum statistics

Threads
1,216,111
Messages
6,128,899
Members
449,477
Latest member
panjongshing

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