If statement

  • Thread starter Thread starter meggie
  • Start date Start date
M

meggie

Hi Everyone,
I am having trouble getting my formula to follow my logic!

I want the cell to follow the logic of:
If AG36>0,then enter AL28-AG36,however if AL28-AG36<0 then enter 0
I currently have
=IF(AG36>0,AG36-AL28,AL28), IF(AG36-AL28<0,0,AG36-AL28)

My logic is not following how it should be and I am getting a Value error.

Thanks in advance!
Cheers,
Meg
 
Your description and formula do not match. As per your description

"If AG36>0,then enter AL28-AG36,however if AL28-AG36<0 then enter 0" try the
below

=IF(AG36>0,MAX(0,AL28-AG36))

If this post helps click Yes
 
and the FALSE statement goes as AL28

=IF(AG36>0,MAX(0,AL28-AG36),AL28)

If this post helps click Yes
 
Back
Top