# If-and formula working incorrectly

1. ## If-and formula working incorrectly

All,

I have constructed an if-and statement to populate a cell based on two factors: if the month (blue) occurs after the 'eligible date' (blue) and the 'variance' (blue) is equal to or greater than zero, the 'actual bonus' (yellow) would populate with 'potential bonus' amount; as it stands, the 'actual bonus' defaults to the 'potential bonus' , and I'd like it to be empty when no data is entered. Please advise.  Register To Reply

2. =IF(AND(B26>=\$C\$5,G26>=0),H26,0)
b26 is greater than c5 so true
g26 is greater than 0 so true (test if(g26>0,"Y","N") returns Y)
both conditions met so H26 returned
try in g26
=IF(F26=0,0,(F26-E26)  Register To Reply

3. Originally Posted by martindwilson =IF(AND(B26>=\$C\$5,G26>=0),H26,0)
b26 is greater than c5 so true
g26 is greater than 0 so true (test if(g26>0,"Y","N") returns Y)
both conditions met so H26 returned
try in g26
=IF(F26=0,0,(F26-E26)
The formula will be true if value is 0 as it is =IF(AND(B26>=\$C\$5,G26>=0),H26,0), so I tried "" in place of zeros and get the same result.  Register To Reply

4. Still getting incorrect result on this one, any input would be appreciated!  Register To Reply

5. Try this formula in I26

=IF(AND(B26>=\$C\$5,G26>=0,ISNUMBER(G26)),H26,0)  Register To Reply

6. Perfect, thanks!  Register To Reply