I have a spreadsheet with text based fraction values. I would like to convert these fractions into decimals in an adjacent column.
Basically, I am wondering if there is an easy way to convert 1/8 in B2 to =1/8 in B3. Any ideas?
I have a spreadsheet with text based fraction values. I would like to convert these fractions into decimals in an adjacent column.
Basically, I am wondering if there is an easy way to convert 1/8 in B2 to =1/8 in B3. Any ideas?
Last edited by Ian.Lance; 08-28-2018 at 02:54 PM.
My first thought is to use the VALUE() function, but that works best with text that cannot be confused as a date. For something like this that I knew would always be a fraction in the form "a/b", I would use something like =VALUE("0 "&B2). This naturally becomes more complicated if the text string can sometimes be a mixed number "c b/a".
Originally Posted by shg
I've tried converting like that with 1/8, but for some reason excel spits out 43108 instead of 0.125. The same thing happens if I use the "text to columns" tool.
If you just try =--B2 you will get a date
Try this, and format as Fraction...
=LEFT(B2,FIND("/",B2)-1)/MID(B2,FIND("/",B2)+1,99)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Did you try exactly what I suggested =VALUE("0 "&B2) or did you try =VALUE(B2). With the latter, I, too get the date value for Jan 8 of current year. I find that it is essential to add the "0 " text to the front of the fraction so that Excel can recognize it as a fraction and not a date.
Oh, I see what I did wrong. I missed the space after the 0. Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks