Looking up a 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--
 
T

T. Valko

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

RyGuy

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?
 

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