I need help with this IF function

Copper Contributor

I want to C1 to include if B1>A1 give me zero, otherwise give me the difference between the two. I've attached a screenshot.

7 Replies

@Cheryl0615 

Does this do what you want?

 

=MAX(A1-B1, 0)

@Cheryl0615 

That could be

=(A1-B1)*(A1>=B1)

or

=MAX(0,A1-B1)
No it only give me zero. It should give me 243.90
Example 1 worked with the multiplication scenario. What if the amounts were flipped and 110.35 was A1 and 354.24 Was B1.

@Cheryl0615 

=(B1-A1)*(A1<=B1)
Thank you!