Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Formula converts a value to Feet Inches and fractions of an inch

Paste this formula below into B2 of Excel, and then enter any number
in inches into cell A1.

=IF(A1<0,"("," ") & IF(TRUNC(ROUND(ABS(A1)*16,0)/
16/12,0)<1,"",TRUNC(ROUND(ABS(A1)*16,0)/16/12,0) & "'" &
IF(MOD(ABS(A1),12)=0, ""," ")) & IF(TRUNC(ROUND(ABS(A1)*16,0)/
16-12*TRUNC(ROUND(ABS(A1)*16,0)/16/12,0))=1,
TRUNC(ROUND(ABS(A1)*16,0)/16-12*TRUNC(ROUND(ABS(A1)*16,0)/16/12,0)) &
IF(MOD(ABS(A1),1)=0,"","-"),"") & IF(MOD(A1,1)=0,"", ROUND(MOD(ABS(A1),
1)*16,0)/GCD(ROUND(MOD(ABS(A1),1)*16,0),16) & "/" & 16/
GCD(ROUND(ABS(A1)*16,0),16)) & IF(MOD(ABS(A1),12)=0,"","""") &
IF(A1<0,")"," ") & IF(ROUND(MOD(ABS(A1),1)*16,0) = MOD(ABS(A1),1)*16,"
","~")


The formula will convert the value into a format like this: 1' 3-5/16"

This formula rounds to the nearest 16th of an inch and if rounding was
required that a tilde ~ will appear on the right side to signify that
it's an approximation rather than being an exact conversion. E.g. 3'
2-3/4"~

Negative numbers are shown inside parentheses. E.g. (1' 10-1/2)

And negative numbers with rounding approximation would be like this:
(2' 4-7/16")~

If you want to round to the nearest 8th of an inch just change every
16 to an 8 in the formula.

I had posted a previous formula a few weeks ago and it had a bug, so I
deleted that message and reposted here.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Formula converts a value to Feet Inches and fractions of an inch

On Oct 7, 8:06*pm, Mark Main wrote:
Paste thisformulabelow into B2 of Excel, and then enter any number
ininchesinto cell A1.

=IF(A1<0,"("," ") & IF(TRUNC(ROUND(ABS(A1)*16,0)/
16/12,0)<1,"",TRUNC(ROUND(ABS(A1)*16,0)/16/12,0) & "'" &
IF(MOD(ABS(A1),12)=0, ""," ")) & IF(TRUNC(ROUND(ABS(A1)*16,0)/
16-12*TRUNC(ROUND(ABS(A1)*16,0)/16/12,0))=1,
TRUNC(ROUND(ABS(A1)*16,0)/16-12*TRUNC(ROUND(ABS(A1)*16,0)/16/12,0)) &
IF(MOD(ABS(A1),1)=0,"","-"),"") & IF(MOD(A1,1)=0,"", ROUND(MOD(ABS(A1),
1)*16,0)/GCD(ROUND(MOD(ABS(A1),1)*16,0),16) & "/" & 16/
GCD(ROUND(ABS(A1)*16,0),16)) & IF(MOD(ABS(A1),12)=0,"","""") &
IF(A1<0,")"," ") & IF(ROUND(MOD(ABS(A1),1)*16,0) = MOD(ABS(A1),1)*16,"
","~")

Theformulawill convert the value into a format like this: 1' 3-5/16"

Thisformularounds to the nearest 16th of an inch and if rounding was
required that a tilde ~ will appear on the right side to signify that
it's an approximation rather than being an exact conversion. *E.g. 3'
2-3/4"~

Negative numbers are shown inside parentheses. *E.g. * (1' 10-1/2)

And negative numbers with rounding approximation would be like this:
(2' 4-7/16")~

If you want to round to the nearest 8th of an inch just change every
16 to an 8 in theformula.

I had posted a previousformulaa few weeks ago and it had a bug, so I
deleted that message and reposted here.



I was told that the tilde is more commonly placed on the left side for
approximation and so this fixes that:

=IF(ROUND(MOD(ABS(A1),1)*16,0) = MOD(ABS(A1),1)*16," ","~") &
IF(A1<0,"("," ") & IF(TRUNC(ROUND(ABS(A1)*16,0)/
16/12,0)<1,"",TRUNC(ROUND(ABS(A1)*16,0)/16/12,0) & "'" &
IF(MOD(ABS(A1),12)=0, ""," ")) & IF(TRUNC(ROUND(ABS(A1)*16,0)/
16-12*TRUNC(ROUND(ABS(A1)*16,0)/16/12,0))=1,TRUNC(ROUND(ABS(A1)*16,0)/
16-12*TRUNC(ROUND(ABS(A1)*16,0)/16/12,0)) & IF(MOD(ABS(A1),
1)=0,"","-"),"") & IF(MOD(A1,1)=0,"", ROUND(MOD(ABS(A1),1)*16,0)/
GCD(ROUND(MOD(ABS(A1),1)*16,0),16) & "/" & 16/GCD(ROUND(ABS(A1)*16,0),
16)) & IF(MOD(ABS(A1),12)=0,"","""") & IF(A1<0,")"," ")
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula converts value into Feet, Inches & Fraction of an Inch Mark Main Excel Discussion (Misc queries) 6 October 20th 08 02:48 AM
How do I use feet and inches (including fractions of inches) MRZ Excel Worksheet Functions 2 September 18th 08 10:35 PM
Converting from feet, inches and fractions to inches and decimal p Dee Setting up and Configuration of Excel 5 September 18th 07 04:18 PM
Feet, inches and fractions to inches and dec.....reposting for Pet Dee Setting up and Configuration of Excel 1 September 18th 07 04:02 PM
Fractions, Feet, Inches, & macros [email protected] Excel Discussion (Misc queries) 7 June 21st 07 05:37 PM


All times are GMT +1. The time now is 08:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"