Is there a Subtract If function

  • Thread starter Thread starter Eric
  • Start date Start date
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
 
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,"")
 
I am trying this formula: =IF(A2:A11>E1,E8-C12,"") whereas A2:A11 are dates, as is E1. I am trying to say if A2 through A11 dates are > E1 date then subtract C12 from E8 .

The formula as I have entered it is just subtracting C12 from E8. It is including all date, even those that are less than E1 date. What have I done wrong?
 
Back
Top