+ Reply to Thread
Results 1 to 3 of 3

Convert fractions to decimals

  1. #1
    Registered User
    Join Date
    09-08-2011
    Location
    BRISTOL
    MS-Off Ver
    Excel 2007
    Posts
    5

    Convert fractions to decimals

    Hello All
    I keep my racing odds in fractions. I like to change them to decimals.
    In one cell called A3 I keep the data, and would like the decimal value in A4.

    If the first digit is L then the decimal value should always be -1.00.
    eg L100\30 should be -1.00 in A3.

    However, if the first digit is W, than I like the decimal value to be in cell A3
    to two decimal places.
    For Example.
    W10\3 should be 3.33 in A3
    W3\1 should be 3.00.in A3
    W10\11 should be 0.91
    W11\4 should be 2.75

    Any help would be welcome.
    (I am using Excel 2002)
    Last edited by PONY; 09-08-2011 at 10:53 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Convert fractions to decimals

    Maybe:

    =IF(LEFT(A3,1)="L",-1,MID(A3,2,FIND("\",A3)-2)/RIGHT(A3,LEN(A3)-FIND("\",A3)))

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    09-08-2011
    Location
    BRISTOL
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Convert fractions to decimals

    Thanks Dom
    That seems to work ok. Thanks very much
    Last edited by PONY; 09-08-2011 at 10:53 AM.

+ 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