+ Reply to Thread
Results 1 to 4 of 4

Thread: Issue with Negatives in IF statement

  1. #1
    Registered User
    Join Date
    09-26-2011
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Issue with Negatives in IF statement

    Hi all,

    I am in desperate need of some help with my IF statement (example attached). I am trying to say if column K (Rate Diff) is less than -0.25% then return a result of $0.00 (i.e. no bonus is paid for anything written 0.25% or more below the min rate). If it is -0.25% or above, then lookup the Bonus % on the LOOKUP REF tab (column 3) and multiply the percentage by column I (NAF). I can get it to work for anything less than 0, but adding in the negative just won't work for all rows. It's driving me mad. Here is what I currently have:

    =IF($K2<-0.25,0,VLOOKUP($A2,'LOOKUP REF'!$A$3:$C$3,3,0)*$I2)

    Can anyone help?

    Thanks in advance!
    Attached Files Attached Files
    Last edited by sambo77; 09-27-2011 at 03:29 AM.

  2. #2
    Forum Guru ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    traded up
    MS-Off Ver
    2003 & 2010
    Posts
    1,905

    Re: Issue with Negatives in IF statement

    Since you are dealing with percents, your test point must be 1/100th of the decimal value. Try:

    =IF($K2<(-0.0025),0,VLOOKUP($A2,'LOOKUP REF'!$A$3:$C$3,3,0)*$I2)
    Other than that, I'm not sure if you intend a VLOOKUP or HLOOKUP based on your lookup table.

    Cheers,
    “To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln

  3. #3
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,228

    Re: Issue with Negatives in IF statement

    I think you just left out the % sign.

    =IF($K2<-0.25%,0,VLOOKUP($A2,'LOOKUP REF'!$A$3:$C$3,3,0)*$I2)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    09-26-2011
    Location
    Perth, Australia
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Issue with Negatives in IF statement

    Quote Originally Posted by JBeaucaire View Post
    I think you just left out the % sign.

    =IF($K2<-0.25%,0,VLOOKUP($A2,'LOOKUP REF'!$A$3:$C$3,3,0)*$I2)

    Wow, I had a feeling it would be something that simple that I had left out. I just added in the % sign and it's working a treat! Thanks so much JBeaucaire!

+ 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.2.0