Imported numbers don't match ones calculated by an Excel formula

  • Hi,


    1st time post and I've got something that just doesn't make sense.


    I'm importing data from a Yahoo group website that I use to calculate monthly dues for a group of associates.


    I had an issue a while ago where someone didn't enter their data correctly and I'm trying to write an audit script to make sure all the numbers are correct before doing the billing.


    Here's an example of the CSV data that I'm importing:
    "09/01/2012", "Big Bird", "717.32", "718.87", "1.55", "801.8", "803.4", "1.6"
    "09/07/2012", "Big Bird", "718.87", "720.21", "1.34", "803.4", "804.6", "1.2"


    Here is how the data looks after I import it:
    [TABLE="width: 775"]

    [tr]


    [td]

    Date

    [/td]


    [td]

    Name

    [/td]


    [td]

    Tach time-in

    [/td]


    [td]

    Tach time-out

    [/td]


    [td]

    Flown Ttime

    [/td]


    [td]

    Hobbs time-in

    [/td]


    [td]

    Hobbs time-out

    [/td]


    [td]

    Flown Htime

    [/td]


    [/tr]


    [tr]


    [TD="align: right"]9/1/2012[/TD]

    [td]

    Big Bird

    [/td]


    [TD="align: right"]717.32[/TD]
    [TD="align: right"]718.87[/TD]
    [TD="align: right"]1.55[/TD]
    [TD="align: right"]801.8[/TD]
    [TD="align: right"]803.4[/TD]
    [TD="align: right"]1.6[/TD]

    [/tr]


    [tr]


    [TD="align: right"]9/7/2012[/TD]

    [td]

    Big Bird

    [/td]


    [TD="align: right"]718.87[/TD]
    [TD="align: right"]720.21[/TD]
    [TD="align: right"]1.34[/TD]
    [TD="align: right"]803.4[/TD]
    [TD="align: right"]804.6[/TD]
    [TD="align: right"]1.2[/TD]

    [/tr]


    [/TABLE]



    So I want to have a formula that verifies that 718.87-717.32 really equals 1.55.


    Problem is when I calcuate 718.87-717.32 and compare it to the 1.55 that I imported, they don't match!


    I've confirmed that all the cells holding the numbers I imported are set to Number and increased the precision of the numbers to make sure I wasn't getting a rounding error (which seemed unlikely due to the simple numbers I'm using).


    Any ideas?


    Regards,
    GregInMI

  • Re: Imported numbers don't match ones calculated by an Excel formula


    Instead of formula =IF(I2=E2;"Match";"Nomatch") use =I2-E2 without IF
    I think it's a calculating precision problem due to csv import

  • Re: Imported numbers don't match ones calculated by an Excel formula


    Are you using "text to columns" ?
    Because when I imported CSV files earlier, the data didn't get the correct "comma" when I used the "text to columns" function. So I had to change that.
    I'm working in a norwegian excel though, dunno if it's the same with the english version

  • Re: Imported numbers don't match ones calculated by an Excel formula


    patel - My goal is to validate the numbers that people have entered into a database that is being exported as a CSV text file. People are entering the numbers manually and I want to audit them before calculating the money they owe. The problem is my audit routine is failing because it can't compare my calculated value with the imported value correctly. I think your idea about the calculating precision is correct, but I can't figure it out. I've tried to increase the number of decimal places to make sure there wasn't any rounding going on and the numbers are very simple. Thanks for looking.


    danielsto - I'm doing an import of a CSV text file so no "text to columns" is being used.

  • Re: Imported numbers don't match ones calculated by an Excel formula


    use this formula
    =IF(I2-E2<0,0001;"Match";"Nomatch")

  • Re: Imported numbers don't match ones calculated by an Excel formula


    patel - That did the trick. Must be a numeric precision issue and I see how you changed the IF around to check for a leftover value after doing the I2-E2. Thanks!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!