Combining functions: Subtraction and IF

J

Jeguth1s

I am trying to combine 2 functions. I need the formula to first calculate this:
=C3-K3.
Based on the value returned i need to combine it with the formula below.
=IF((E3< 0),"On Time")

I want it to return "On Time" if the value of the first subtraction yields 0.
if the returned vale is >0, I need it to return the diff of the original
subtraction.
Thanks
 
T

T. Valko

If the values you're dealing with are *always* positive then the only way to
get 0 when subtracting C3-K3 is if both cells are equal.

If that's the case:

=IF(C3=K3,"On Time",C3-K3)

Here's a generic version that accounts for not having defined what to do if
C3-K3 <0:

=IF(C3-K3=0,"On Time",IF(C3-K3>0,C3-K3,""))

Neither formula accounts for having empty cells.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top