INDEX w. MATCH function



am attempting to use the index and match functions to find the intersection
of project names and specific dates. The project names are along the rows in
the lefthand side and the dates are in one row across several columns. I have
set my index area, been able to match the project name using quotations, but
the formula will not let me return a column for the dates, I have tried
formattion the date, using quotations, but nothing will work. Can the MATCH
function be used with dates? Is there another formula to accomplish this? The
setup is as follows and as well as my formula, as always any help is most

1/1/2009 2/2/2009 3/3/2009 4/4/2009
Project A
Project B
Project C

=INDEX(schedule,MATCH("Project A",project

John C

You might want to try a VLOOKUP with match instead:
=VLOOKUP(project name,$A$1:$M$13,MATCH(date,$A$1:$M$1,0),0)
This assumes your table with column and row headers is in cells A1:M13

T. Valko

Try using cells to hold the lookup criteria:

A1 = Project A
B1 = 1/1/2009



John, still getting a n/a, what is incorrect w/ my formula below?

=VLOOKUP("project A",schedule,MATCH("1/1/2009",dates,0),0)

also, the names I have given to schedule and dates have ranges of A7:AE79
and A7:AE7 respectively, still no luck

John C

Chances are good that your dates aren't really 'dates', either in your row 7
or in your actual vlookup. Most likely the trouble is with row 7, your dates
range. You can test this by typing the following in a blank cell above/below
your row 7. Assuming your dates actually start in B7
=ISNUMBER(B7), and copy across to column AE.
How are the dates in row 7 computed? I only ask because most people that go
from month A to month B don't go from 1/1/2009 to 2/2/2009 to 3/3/2009 etc.
They usually make everything one specific day of the month.


John, I tested the isnumber function across and it came up true for all of
the "dates". AS for how the dates are computed, they are not really in any
true order as the dates are formatted only to show the Jan-09 diction in the
cell, eventhough when positioned in the cell it will state 1/2/2009. Where am
I getting tripped up on this?

John C

Well, if for example you have the Feb-09 diction, but in reality it is
2/2/2009, then if you are trying to match 2/1/2009, then it will not match.
What you should do is have a basic day (i.e.: the 1st) for all dates in
A7:AE7. You can format it to appear however you want it to appear, but the
day must match your lookup value. From your own remark, the formula bar shows
the date as 1/2/2009, but you are trying to find a match of "1/1/2009". They
obviously do not match. I would change all the 'days' of A7:AE7 to
1.....1/1/2009 2/1/2009 3/1/2009 etc.
Then when you match, you can either use "1/1/2009" or, I would maybe even
recommend using the DATE function as Dave P points out:
=VLOOKUP("project A",schedule,MATCH(DATE(2009,1,1),dates,0),0)

Actually, I really recommend having 2 criteria cells in which to plug into
your formula rather than hardcoding the VLOOKUP.
Say your table is on another sheet (your two ranges dates and schedule
Say the month you are looking for is in cell B1 and the date you are looking
for is in cell A1
Then you could look up anything just by changing your two parameter cells
(or you could make more parameter cells below A1:B1 and just copy the formula
Always remember to enter the date with a consistent entry of the day of the
month for your table as well as your criteria.

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