+ Reply to Thread
Results 1 to 6 of 6

If formula - gives error on negative number

Hybrid View

  1. #1
    Registered User
    Join Date
    10-27-2006
    Posts
    3

    If formula - gives error on negative number

    I have a formula as follows IF(L23=Sheet1!G73,"BALANCES","ERROR")

    However on a negative calculation it shows error even though the 2 figures match.

    I've audited the formula and these are the results?

    1. It evalutes L23, which contains the following formula SUM(L13:L22) and shows (8,370)

    2. It shows in audit windows as IF(-8370.43000000001=Sheet1!G73,"BALANCES","ERROR")

    3. Next step results in this
    IF(-8370.43000000001=-8370.43,"BALANCES","ERROR")

    4. Next step it evalutes IF(FALSE,"BALANCES","ERROR")

    Can anyone explain why it does not balance? and how i can improve my formula?

  2. #2
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723
    hi,

    you should not have a problem

    = IF(L23=Sheet1!G73,"BALANCES","ERROR")


    i have only put the = sign inf ront of it and it works fine
    steve

  3. #3
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    =IF(Round(L23,6)=Round(Sheet1!G73,6),"BALANCES","ERROR")

    should do the trick. Sometimes the value resulting from a formula could be 1.999999999 or 1.000000001 when you are expecting 1. So a good bet is to use the round fuinction.

    Mangesh

  4. #4
    Registered User
    Join Date
    10-27-2006
    Posts
    3
    Thanks Mangesh it works with that. Can you just help with this formula as well which is also giving an the same error on a negative figure

    =IF((SUM(I73:W73)+E73)-X73=0,"BALANCES","ERROR")

  5. #5
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    =IF(ROUND((SUM(I73:W73)+E73)-X73,6)=0,"BALANCES","ERROR")

    Mangesh

  6. #6
    Registered User
    Join Date
    10-27-2006
    Posts
    3
    works a treat, thks for your help

+ 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