ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cell formatting (https://www.excelbanter.com/excel-discussion-misc-queries/42728-cell-formatting.html)

rcolmansr60

Cell formatting
 

How do I format a cell for feet-inches, where the inches may be whole
number with a fraction? Like 9'-7 3/8"
Dick


--
rcolmansr60
------------------------------------------------------------------------
rcolmansr60's Profile: http://www.excelforum.com/member.php...o&userid=26731
View this thread: http://www.excelforum.com/showthread...hreadid=399867


Gary's Student

Let's say that cell A1 contains a length in feet: 12.1 then in cell B1 put:

=INT(A1)&"' "&INT(12*(A1-INT(A1)))&""" "&TEXT(MOD(12*(A1-INT(A1)),1),"##/##")

which will display as 12" 1" 1/5

If you need the reverse, put the feet and inches into separate cells to make
the math easier
--
Gary's Student


"rcolmansr60" wrote:


How do I format a cell for feet-inches, where the inches may be whole
number with a fraction? Like 9'-7 3/8"
Dick


--
rcolmansr60
------------------------------------------------------------------------
rcolmansr60's Profile: http://www.excelforum.com/member.php...o&userid=26731
View this thread: http://www.excelforum.com/showthread...hreadid=399867




All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com