+ Reply to Thread
Results 1 to 10 of 10

Fraction to Decimal

  1. #1
    Registered User
    Join Date
    01-30-2013
    Location
    Long Island NY
    MS-Off Ver
    Office 365
    Posts
    81

    Fraction to Decimal

    I got an Excel Spread sheet from one of my suppliers and I'm trying to use the data to do a bulk import into my online store.

    One of the fields is written in "general" format. All the cells in the column are written as fractions (including the " sign) i.e. 3 3/4"

    I used the following function to strip off the "

    =CONCATENATE(LEFT(AB2, LEN(AB2)-1))

    My problem is no matter how I format the cells, I can't get the resulting fractional number to appear as a decimal number (I need it to be in decimal form not "behind the scenes" but visually in the cell so it imports properly.

    I know that this should be simple, but it aint for me!

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,827

    Re: Fraction to Decimal

    Did you try applying the =VALUE() function to the result of your =LEFT() function instead of the =CONCATENATE() function? The concatenate function will return a text string. What you need is to convert the text string to a number, which is what the value function should do.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Fraction to Decimal

    Or =--SUBSTITUTE(A1, """", "")
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    01-30-2013
    Location
    Long Island NY
    MS-Off Ver
    Office 365
    Posts
    81

    Re: Fraction to Decimal

    Thanks Guys,

    Both of those solutions worked great for numbers where the value was greater than 1 (i.e. 3 7/8"), but for values less than 1, I got some wacky results.

    For example, 3/4" yielded the value of 41337!

    Ideas?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Fraction to Decimal

    Put a zero in front of it:

    0 3/4"

  6. #6
    Registered User
    Join Date
    01-30-2013
    Location
    Long Island NY
    MS-Off Ver
    Office 365
    Posts
    81

    Re: Fraction to Decimal

    Thanks. That worked but it entails searching through the raw data my supplier gave me and manually adding the "0" where it's needed. Not really a good option since there are over 1,200 fields in all.

    Is there a more elegant approach?

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Fraction to Decimal

    hi Michael D, welcome to the forum. try:
    =(IF(ISNUMBER(FIND(" ",AB2)),"","0 ")&LEFT(AB2,LEN(AB2)-1))+0

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  8. #8
    Registered User
    Join Date
    01-30-2013
    Location
    Long Island NY
    MS-Off Ver
    Office 365
    Posts
    81

    Re: Fraction to Decimal

    Thanks Ben!

    Not to be pushy, but I get an error in the few cases where there happens to be a whole number in the cell that I'm trying to parse. Any idea how to handle it?

    Mike

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Fraction to Decimal

    It gets longer
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  10. #10
    Registered User
    Join Date
    01-30-2013
    Location
    Long Island NY
    MS-Off Ver
    Office 365
    Posts
    81

    Re: Fraction to Decimal

    Awesome! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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