+ Reply to Thread
Results 1 to 4 of 4

IF statement unable to process negatives

  1. #1
    Forum Contributor
    Join Date
    11-23-2007
    Location
    Suffolk, UK
    Posts
    298

    IF statement unable to process negatives

    Hello,

    I have a problem with an IF statement, i have a "sheet value" and a "Revenue" value, the sheet value may be higher or lower than the revenue value, thus giving either a + or - value, i'm trying to get a return if the difference between the sheet and revenue is less than 10%, i have tried my own formula but it won't work with negative values, i have attached a worksheet with an example

    thanks reg
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196

    Smile

    It is rather a brute force way of doing it but if you put the value to the power of 2 and then square root it it will become the same value but positive so the formula for cell E5 would be =IF(C5-B5=0,"",(IF((SQRT(POWER((C5-B5),2)))>C5*$E$3,A5,"")))

    Hope this helps.

    Jack

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by reggie1000
    Hello,

    I have a problem with an IF statement, i have a "sheet value" and a "Revenue" value, the sheet value may be higher or lower than the revenue value, thus giving either a + or - value, i'm trying to get a return if the difference between the sheet and revenue is less than 10%, i have tried my own formula but it won't work with negative values, i have attached a worksheet with an example

    thanks reg
    Try using ABS():
    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Contributor
    Join Date
    11-23-2007
    Location
    Suffolk, UK
    Posts
    298
    thanks chaps,

    works great

    cheers reg

+ 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