View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Combining functions: Subtraction and IF

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-K30,C3-K3,""))

Neither formula accounts for having empty cells.

--
Biff
Microsoft Excel MVP


"Jeguth1s" wrote in message
...
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