+ Reply to Thread
Results 1 to 7 of 7

Converting text based fractions to numerical values

Hybrid View

  1. #1
    Registered User
    Join Date
    08-20-2018
    Location
    Mass, USA
    MS-Off Ver
    MS365 version 2303
    Posts
    28

    Question Converting text based fractions to numerical values

    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.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,406

    Re: Converting text based fractions to numerical values

    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".
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    08-20-2018
    Location
    Mass, USA
    MS-Off Ver
    MS365 version 2303
    Posts
    28

    Re: Converting text based fractions to numerical values

    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.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Converting text based fractions to numerical values

    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

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,406

    Re: Converting text based fractions to numerical values

    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.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Converting text based fractions to numerical values

    Quote Originally Posted by MrShorty View Post
    Did you try exactly what I suggested =VALUE("0 "&B2)...
    MUCH simpler option than my suggestion!!

  7. #7
    Registered User
    Join Date
    08-20-2018
    Location
    Mass, USA
    MS-Off Ver
    MS365 version 2303
    Posts
    28

    Re: Converting text based fractions to numerical values

    Oh, I see what I did wrong. I missed the space after the 0. Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need help with Data Validation Formula for a set of numerical and text-based values
    By bozhidar.ivanov in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-30-2014, 10:32 AM
  2. How to generate a string of text, based on numerical values defined in sheet
    By fleshbug in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-05-2013, 06:04 PM
  3. Converting text strings into numerical values for multiple entries
    By exceln00bie113 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-13-2013, 10:55 AM
  4. Excel 2007 : Converting text values to numerical values
    By andybocchi in forum Excel General
    Replies: 7
    Last Post: 11-01-2010, 07:49 PM
  5. Converting certain grades to certain numerical values
    By breyenc in forum Excel General
    Replies: 5
    Last Post: 10-17-2010, 07:25 AM
  6. Converting Decimal Fractions to Fractions of a Specified Number
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-29-2005, 11:09 AM
  7. [SOLVED] converting from text to numerical number
    By james in forum Excel General
    Replies: 1
    Last Post: 02-01-2005, 10:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1