+ Reply to Thread
Results 1 to 11 of 11

Extracted Fraction From Text, Need to convert it to fraction instead of Date

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    Edmonton, AB
    MS-Off Ver
    Excel 2007
    Posts
    6

    Extracted Fraction From Text, Need to convert it to fraction instead of Date

    "B2" '3/16X12


    "C2" =LEFT(B2,FIND("X",B2)-1)

    returns 3/16

    How can I convert it to fraction?

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Extracted Fraction From Text, Need to convert it to fraction instead of Date

    In cell C2, try this:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Registered User
    Join Date
    06-11-2013
    Location
    Edmonton, AB
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Extracted Fraction From Text, Need to convert it to fraction instead of Date

    It does not work. Still extracted as a date.

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Extracted Fraction From Text, Need to convert it to fraction instead of Date

    Try

    =LEFT(B2,FIND("/",B2)-1)/MID(B2,FIND("/",B2)+1,FIND("X",B2)-FIND("/",B2)-1)

    Format as # ?/??
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Forum Contributor bentleybob's Avatar
    Join Date
    02-27-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    644

    Re: Extracted Fraction From Text, Need to convert it to fraction instead of Date

    =VALUE("0 "&C2)

    or, if you want it in C2

    =VALUE("0 "&LEFT(B2,FIND("X",B2)-1))

  6. #6
    Registered User
    Join Date
    06-11-2013
    Location
    Edmonton, AB
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Extracted Fraction From Text, Need to convert it to fraction instead of Date

    than you. much appreciated. as i thought it would me long method.

  7. #7
    Registered User
    Join Date
    06-11-2013
    Location
    Edmonton, AB
    MS-Off Ver
    Excel 2007
    Posts
    6

    Extracted Fraction from text, need to convert as fraction instead of date version 2

    "B2" '1-3/16X12

    "C2" =LEFT(B2,FIND("X",B2)-1)

    returns 1-3/16
    but reads as a date


    How can I convert to "C2" to fraction?
    Thanks.

    version 1: This not not work on the above problem
    "B2" '3/16X12

    "C2" =LEFT(B2,FIND("X",B2)-1)

    Solution:
    =VALUE("0 " &C2)

  8. #8
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Extracted Fraction from text, need to convert as fraction instead of date version 2

    Hi -

    I copied and pasted your example into a blank spreadsheet and it appeared to work o.k. Are you having a formatting issue? When you say it reads as a date, do you mean January 3, 1916?
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  9. #9
    Registered User
    Join Date
    06-11-2013
    Location
    Edmonton, AB
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Extracted Fraction from text, need to convert as fraction instead of date version 2

    it should treat it as a 1.1875 in fraction format, not as a date March 16, 2001(as it appears mine)

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Extracted Fraction from text, need to convert as fraction instead of date version 2

    well you can using an old excel4 macro but you need it to be used in a named formula
    where exactly is this data you want to convert? it matters because of the construction of the named formula
    but lets assume its col b define a name as say"mysum"
    =EVALUATE(SUBSTITUTE(Sheet1!$b1,"X","*"))
    then with 1-3/16X12 in b2
    =mysum in c2 will give
    -1.25
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  11. #11
    Registered User
    Join Date
    06-11-2013
    Location
    Edmonton, AB
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Extracted Fraction from text, need to convert as fraction instead of date version 2

    Thanks anyway, I just got an idea on your post.

    =VALUE(SUBSTITUTE(LEFT(B2,FIND("X",B2)-1),"-"," "))

+ 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