Multiple value if function using dates

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
 
J

JoeU2004

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 -----
 
L

latsyrc57

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 -----
 

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