+ Reply to Thread
Results 1 to 2 of 2

Converting minus to forward slash = incorrect results

  1. #1
    Registered User
    Join Date
    03-12-2009
    Location
    CA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Converting minus to forward slash = incorrect results

    Hi all.

    I have copied and pasted sports statistics from a website that tracks number of made basketball shots versus number of total shots. For example 5-10 is supposed to indicate the player made five of ten shots or 50%.

    So I can go ahead and set these cells to a format of number or percentage, but when I attempt to convert the minus sign to a forward slash via find and replace, Excel attempts to calculate the value, but somehow totally screws up! So, in our 5/10 example, Excel (2007) turns this value into 3994300% or 39943.00.

    Note that in Openoffice Calc, when I select the value of the cell, each value is proceeded by an apostrophe. When I remove the apostrophe, Calc does the same thing. If I enter "=5/10" in either program, the value is calculated as expected.

    Any ideas?

    Thanks in advanced,

    Dan
    Last edited by VBA Noob; 03-12-2009 at 01:42 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Converting minus to forward slash = incorrect results

    Excel is being helpful and sees 5/10 as 10th May 2009... Dates in XL are integers and the integer value of 10th May 2009 is 39943.

    I would suggest you leave your initial data as is (eg '5-10) and do a calculation in an adjacent column

    If we assume A1 holds '5-10 then you can use the following in B1 (quick fix):

    =LEFT(A1,FIND("-",A1&"-")-1)/MID(A1,FIND("-",A1&"-")+1,100)

    Copy down as necessary.

+ 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