Thread
:
change feet and inches to decimal inches
View Single Post
#
2
Posted to microsoft.public.excel.worksheet.functions
joeu2004
external usenet poster
Posts: 2,059
change feet and inches to decimal inches
"Brian 1" <Brian
wrote:
I have feet and inches in a cell as text and want it to be inches
as a decimal. Before (2"-4 1/2") after (28.5)
Does the following suit your needs (assumes the text form is in A1):
=12*LEFT(A1, FIND(CHAR(39),A1)-1)
+TEXT(MID(A1, 1+FIND(CHAR(39), A1), LEN(A1)-FIND(CHAR(39),A1)-1),
"General")
You can use General or any numeric format for the cell.
Instead of CHAR(39), you could write "'", which is an apostrophe between
double-quotes. (Hard to read!)
Note: That assumes you meant to write 2' 4 1/2", not literally 2"-4 1/2".
If you truly meant the latter (surprise!), the following should do the
trick:
=12*LEFT(A1, FIND(CHAR(34),A1)-1)
+TEXT(MID(A1, 1+FIND("-",A1), LEN(A1)-FIND("-",A1)-1), "General")
where CHAR(34) is the ASCII code for double-quote.
----- original message -----
"Brian 1" <Brian
wrote in message
...
I have feet and inches in a cell as text and want it to be inches as a
decimal.
Before (2"-4 1/2") after (28.5)
I would like to us a formula or number type to convert.
Reply With Quote
joeu2004
View Public Profile
Find all posts by joeu2004