Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
fractions to decimal
I want to have one cell call a cell that has a fraction in it that is
formated like so 0'-7/8" I need it to be formated like 0'-0 7/8" so with the following code I can convert it to decimal. [=SUBSTITUTE(LEFT(H69,FIND("-",H69)-1),"'","")*12+SUBSTITUTE(REPLACE(H69,1,FIND("-",H69),""),"""","")] the above code works when it is formated correctly Please help Thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
fractions to decimal
Is this a custom cell format, or just content stored as the text default?
if text, why not just search/replace "-" with "- 0 " Or if you have mixed cells (you didn't provide much detail), use code to find cells where [logic, not code] =Len ((find("/",string))-(find("-",string)))< 3 and just replace in those cells HTH Keith "Alvin" wrote: I want to have one cell call a cell that has a fraction in it that is formated like so 0'-7/8" I need it to be formated like 0'-0 7/8" so with the following code I can convert it to decimal. [=SUBSTITUTE(LEFT(H69,FIND("-",H69)-1),"'","")*12+SUBSTITUTE(REPLACE(H69,1,FIND("-",H69),""),"""","")] the above code works when it is formated correctly Please help Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Converting decimal fractions of minutes to seconds | Excel Worksheet Functions | |||
Convert decimal to fractions | Excel Worksheet Functions | |||
excel conditional formating decimal fractions | Excel Worksheet Functions | |||
converting fractions to decimal | Excel Discussion (Misc queries) | |||
How do I convert decimal inches to fractions in excel | Excel Discussion (Misc queries) |