+ Reply to Thread
Results 1 to 5 of 5

help converting Fractions with/without whole number

Hybrid View

  1. #1
    Registered User
    Join Date
    05-27-2015
    Location
    Florida, US
    MS-Off Ver
    2013
    Posts
    33

    help converting Fractions with/without whole number

    Hello im having an issue with a formula i found in another thread that i tried applying to my circumstance. Im trying to convert fractions into decimals. The fractions might be whole numbers with a fraction or just a fraction by itself.

    ex: Column D Row 37 (could be row 23-46) has a fraction "3/32", in cell J37 i put the following formula: =0+TRIM(SUBSTITUTE(A1,CHAR(160)," "))

    The result it gives me is "11749", but when the same cell (D37) has "1 3/32" it gives me "1.09375" (desired result).

    Changing Cell D37 to fraction format gives me the result i want in J37 but changes the value in D37.
    Attached Files Attached Files
    Last edited by jafvortex93; 09-23-2015 at 08:47 AM. Reason: Edited to add excel file

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: help converting Fractions with/without whole number

    For Excel reasons, 3/32 is recognised as a date, that is March 1932, which is 11749.

    Try this instead: For fractions recorded as text (D1 and D2 of your file) =0+TRIM(SUBSTITUTE(IF(ISERROR(FIND(" ",D1)),"0 ","") & D1,CHAR(160)," "))

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: help converting Fractions with/without whole number

    Try this formula in B1 and copy down

    =IF(ISERROR(FIND(" ",A1)),--("0 "&A1),--TRIM(SUBSTITUTE(A1,CHAR(160)," ")))

    if your range is different change A1 to to whatever your range is

    Data Range
    A
    B
    1
    3/32
    0.09375
    2
    1 3/32
    1.09375
    3
    1 8/16
    1.5
    4
    2 8/32
    2.25
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Registered User
    Join Date
    05-27-2015
    Location
    Florida, US
    MS-Off Ver
    2013
    Posts
    33

    Re: help converting Fractions with/without whole number

    @quekbc and @alkey Thanks guys . Both formulas worked perfectly. Can either of you break down the formula for me? i would like to better understand what exactly it is saying.

    Edit:

    Apparently excel can convert fractions for you by changing the format to "number" and adjusting the decimal places as needed. and then just changing the format back to fraction (it even simplifies the fraction).
    Last edited by jafvortex93; 09-23-2015 at 10:47 AM. Reason: Adding alternative.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: help converting Fractions with/without whole number

    With IF(ISERROR(FIND(" ",A1)) formula will check if there is a space and if not it will return an error. So, in this case it will invoke first formula --("0 "&A1), otherwise it will use --TRIM(SUBSTITUTE(A1,CHAR(160)," ")). Double-unary "--" will convert text to a real number.

+ 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. [SOLVED] Having trouble converting fractions to decimals.
    By i.r.smith in forum Excel General
    Replies: 12
    Last Post: 01-22-2015, 08:34 AM
  2. Converting Fractions to Decimals in Excel
    By NoSaint55 in forum Excel General
    Replies: 1
    Last Post: 08-22-2014, 12:56 PM
  3. Converting fractions to decimals
    By Millertime31 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-24-2011, 04:56 PM
  4. converting decimals to fractions
    By jason2444 in forum Excel General
    Replies: 5
    Last Post: 01-19-2006, 11:40 PM
  5. [SOLVED] converting decimals to fractions
    By jason2444 in forum Excel General
    Replies: 1
    Last Post: 01-19-2006, 10:00 PM
  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 fractions to decimal
    By PDI-AV in forum Excel General
    Replies: 5
    Last Post: 06-24-2005, 11:05 PM

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