ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I format a cell in feet? (https://www.excelbanter.com/excel-programming/424567-how-do-i-format-cell-feet.html)

Ted M.

How do I format a cell in feet?
 
How can I format a cell so that when I enter 12.5 it shows 12'6"? I am
trying to do this so in another cell I can multiply the length by another
number.

Rick Rothstein

How do I format a cell in feet?
 
You can use this formula to convert the value 12'6"" to the numeric value
12.6 in another cell...

=--SUBSTITUTE(SUBSTITUTE(A1,"'","."),"""","")

or you can use this...

SUBSTITUTE(SUBSTITUTE(A1,"'","."),"""","")

directly in a calculation involving other numeric values (no double unary is
required under this circumstance). You don't show any spaces between the
foot-mark and the number of inches; however, if that could occur, then you
would need to remove it. That can be done by adding another SUBSTITUTE
function call...

=--SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"'","."),"""", "")," ","")

--
Rick (MVP - Excel)


"Ted M." <Ted wrote in message
...
How can I format a cell so that when I enter 12.5 it shows 12'6"? I am
trying to do this so in another cell I can multiply the length by another
number.




All times are GMT +1. The time now is 04:45 PM.

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