Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default change feet and inches to decimal inches

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.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default change feet and inches to decimal inches

Try this one:

=12*LEFT(A1, FIND(CHAR(39),A1)-1)+TEXT(MID(A1, 1+FIND("-", A1),
LEN(A1)-FIND("-",A1)),"General")

Had to change the Char(39)'s in Find to "-"

Regards,
Fred.

"Brian 1" wrote in message
...
I put the formula in and it seems to subtract the inches and fraction from
the feet.

4'-7 1/4 comes out as 40.75. ????
close but no cigar.


"JoeU2004" wrote:

"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.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default change feet and inches to decimal inches

"Brian 1" wrote:
I put the formula in and it seems to subtract the inches and fraction from
the feet.

4'-7 1/4 comes out as 40.75. ????
close but no cigar.


Well, you have now presented two different forms for your text. Close, but
no cigar.

I already gave you a second formula to deal with the "-". But you cannot
seem decide if feet is indicated by single or double-quote, and if inches is
followed by double-quote. The mistake is yours, not mine.


----- original message -----

"Brian 1" wrote in message
...
I put the formula in and it seems to subtract the inches and fraction from
the feet.

4'-7 1/4 comes out as 40.75. ????
close but no cigar.


"JoeU2004" wrote:

"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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert decimal inches into feet and inches Jason Stripling Excel Discussion (Misc queries) 2 April 23rd 09 02:45 PM
change decimal to feet and inches Eyde Excel Discussion (Misc queries) 10 December 15th 08 03:14 PM
Convert inches & display as Feet Inches and Fractions -- BUG FREE Mark Main Excel Worksheet Functions 12 November 26th 08 09:50 PM
How do I convert decimal to feet and inches Erik Excel Worksheet Functions 5 October 25th 07 11:54 PM
Converting from feet, inches and fractions to inches and decimal p Dee Setting up and Configuration of Excel 5 September 18th 07 04:18 PM


All times are GMT +1. The time now is 12:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"