Looking up a date

  • Thread starter Thread starter RyGuy
  • Start date Start date
R

RyGuy

Trying to get this to work, but no success
=LOOKUP(A6,{DATEVALUE("3/26/2010"),DATEVALUE("6/24/2010"),DATEVALUE("9/22/2010")},{"3","2","1"})

The value in A6 is a function; not hard-coded.

It seems to work with one date and one result vector, but not two, and
ultimately I will need several, maybe 7 or 8.

Any ideas?

Thanks!
Ryan--
 
You can't use functions in array constants.
ultimately I will need several, maybe 7 or 8.

Why don't you just create a table in ascending order by date:

.............A.........B
1...3/26/2010...3
2...6/24/2010...2
3...9/22/2010...1


A6 = some date

=LOOKUP(A6,A1:B3)
 
I could do that, but I have MANY different dates, no logical pattern (except
in this example, which is date + 90 days). I actually thought it would be
easier to hard-code these. Usually I don't do this, but this time it just
seems like it is easier to do it this way. What do you think?
 
Back
Top