Vlookup using dates in the lookup range

G

Guest

I am trying to use dates in a vlookup table and then looking up its value.
For example I have a date range from 01-01-07 to 01-28-07 and the value to be
looked up is 01, the next range is 01-29-07 to 02-25-07, and value 02, the
next range is 02-26-07 to 04-01-07, value is 3. However, when I have the
vlookup look at the date 03-26-07 it shows the value as 02. Anyone know what
I am doing wrong. The table is
01/01/07 AP017
01/28/07 AP017
02/25/07 AP027
04/01/07 AP037
 
G

Guest

Think you just need to re-define your ascending sort vlookup table like this

1-Jan-07 AP017
29-Jan-07 AP027
26-Feb-07 AP037
1-Apr-07 AP047
....

then your vlookup* on the date: 26-Mar-07
will return the correct: AP037

*example in E1: =VLOOKUP(D1,A:B,2,TRUE)
where D1 contains the lookup date
and the lookup table is in cols A and B
 
G

Guest

I found the problem. I needed to use the start date of the date range. I
was using the end date of the date range.

Thanks for the input.
 
G

Guest

I found the problem. I needed to use the start date of the date range. I
was using the end date of the date range.

Thanks for the input.
 

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