Lookup formula for both row and column

G

gcw

I am trying to do a lookup on both row and column. My spreadsheet has
targets per cost center (Rows) by Months (Columns) starting in Column D. The
"Row" lookup is working but how do I add the second portion. See ???? below

This is the formula I have so far:

=VLOOKUP($A3,TLTargets!$A$46:$Q$86,????,FALSE)
 
A

Alan Moseley

I can see that you realise that you need to lookup the column number. You
could use the MATCH function to do this. For example, if your column
headings are in row 45, use:-

MATCH("Apr",$A$45:$Q$45,0)
 
G

gcw

So this "match" formula should go in the middle of the formula below where
the ???? are?
 
S

Shane Devenshire

Hi,

=VLOOKUP($A3,TLTargets!$A$46:$Q$86,MATCH(Month,Months,0),FALSE)

Where Month is the month you want to find and Months is the range (row where
the months are listed)

A more standard way to do this would be to use Match with INDEX or OFFSET:

=INDEX(TLTargets!$A$46:$Q$86,MATCH(A3,TLTargets!$A$46:$A$86,0),MATCH(Month,Months,0))

Cheers,
Shane Devenshire
 
A

Alan Moseley

That's right, replace the ????s with the MATCH formula. You may have to
adjust the column number that gets returned from the match.
 

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