Multiple value if function using dates

  • Thread starter Thread starter latsyrc57
  • Start date Start date
L

latsyrc57

Have Today() (08/27/2009) in A1, have a date in D9 (09/04/2009) and another
date in E9 (09/11/2009).

If A1 is less than D9, then I want F9 = G9
If A1 is greater than D9 but less than E9, then I want F9 = H9
If A1 is greater than both D9 and E9, I want F9 = I9
Using Excel 2003
 
latsyrc57 said:
If A1 is less than D9, then I want F9 = G9
If A1 is greater than D9 but less than E9, then I want F9 = H9
If A1 is greater than both D9 and E9, I want F9 = I9

In F9, perhaps:

=IF(A1<D9, G9, IF(AND(A1>D9,A1>E9), I9, H9))

You did not cover the case when A1=D9 and the case when A1>D9 and A1=E9. I
interpreted your second condition (returning H9) as: if A1 is equal to D9,
or if A1 is greater than D9 and A1 is less than or equal to E9. Is that
right?


----- original message -----
 
Thank you - this gives me what I needed!

JoeU2004 said:
In F9, perhaps:

=IF(A1<D9, G9, IF(AND(A1>D9,A1>E9), I9, H9))

You did not cover the case when A1=D9 and the case when A1>D9 and A1=E9. I
interpreted your second condition (returning H9) as: if A1 is equal to D9,
or if A1 is greater than D9 and A1 is less than or equal to E9. Is that
right?


----- original message -----
 
Back
Top