View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default is it possible to show a decimal like 142.35" as 10'-

On Sun, 6 Apr 2008 09:59:04 +0900, EXCEL?NEWS wrote:

hi,

i am using ft and in these days,

is it possible to show a decimal like 142.35" as 11'-10 1/4" in one cell,

cell format seems impossible,any hints

thanks


Excel does not have a "feet/inches" format, but you can convert your value into
a text string.

With your value in A1:

=INT(A1/12)&"'–"&TEXT(ROUND(MOD(A1,12)*4,0)/4,"# ??/??\""")

Note the formula is rounding to the nearest 1/4. If you need to round to 8ths
or 16ths (or anything up to 99ths), change the "4" factor in the above equation
accordingly.
--ron