How can I display a number as feet and inch in single cell, ie. 8.5 to display 8'-6"
C covdbrdg Sep 11, 2006 #1 How can I display a number as feet and inch in single cell, ie. 8.5 to display 8'-6"
B bigwheel Sep 11, 2006 #2 You could do it with a user defined function e.g. Function d_to_fi(numberarg As Double) feet = Int(numberarg) inches = Format((numberarg - Int(numberarg)) * 12, "#0") d_to_fi = feet & " ' - " & inches & """" End Function
You could do it with a user defined function e.g. Function d_to_fi(numberarg As Double) feet = Int(numberarg) inches = Format((numberarg - Int(numberarg)) * 12, "#0") d_to_fi = feet & " ' - " & inches & """" End Function
D Dave O Sep 11, 2006 #3 It can be done with a formula: =INT(A1)&CHAR(39)&"-"&MOD(A1,INT(A1))*12&CHAR(34) ....but I don't know if there is a way to create a custom format to do it.
It can be done with a formula: =INT(A1)&CHAR(39)&"-"&MOD(A1,INT(A1))*12&CHAR(34) ....but I don't know if there is a way to create a custom format to do it.
B bigwheel Sep 11, 2006 #4 Or you could use a formula:- =(TEXT(INT(A1),"0")&"' "&TEXT((A1-INT(A1))*12,"0")&"""")
C covdbrdg Sep 11, 2006 #6 I GOT IT FROM ANOTHER POST... I need to be able to do this in a singlt cell, like formatting.