Is there a Subtract If function

E

Eric

I'm trying to create a formula that will subtract two
cells if the second cell is greater than zero. I can't
find this anywhere and can't imagine Microsoft creating a
SumIf function without creating a subtractif function.
Any help is greatly appreciated. Thanks in advance
Eric
 
A

Alan

If I understand correctly,with say 120 in A1 and 30 in B1
=IF(B1>0,A1-B1,0) or =IF(B1>0,A1-B1,"")
 
Top