vlookup and hlookup in the same formula

G

Guest

Hi,
I have a spreadsheet that I would like to pull data from a pivot table on a
different sheet. The data I have would need to pull from both the rows and
the columns. It would look like this:
Labor Code x Labor Code y Labor Code z
Name
Name
Name
Name

I would like the lookup to reference the name and the labor code from the
pivot table. Is there a way to combine a Vlookup with an Hlookup? Thanks.
 
G

Guest

=INDEX(data range,MATCH("mama",A1:A100,0),MATCH("Labor Code y",A1:C1,0))

Adjust to suit
 
G

Guest

Teethless mama

I have tried using a formula, based on your suggestion below, but I'm
getting the column header instead of the cell value that I need.

This is what I have entered in cell AV4:
=INDEX(1:65536,MATCH(AU4,A12:A112,0),MATCH(AU3,A1:AT1,0))

AU4 is a client code that I need to find in range A12 to A112.
AU3 is the column header that I need to find in range A1:AT1 - cell AU3 has
a formula and will therefore update when other figures are updated.
T12 contains the result that I need.

Any suggestions?
 
R

RagDyeR

Try this:

=INDEX(A1:AT112,MATCH(AU4,A1:A112,0),MATCH(AU3,A1:AT1,0))

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

Teethless mama

I have tried using a formula, based on your suggestion below, but I'm
getting the column header instead of the cell value that I need.

This is what I have entered in cell AV4:
=INDEX(1:65536,MATCH(AU4,A12:A112,0),MATCH(AU3,A1:AT1,0))

AU4 is a client code that I need to find in range A12 to A112.
AU3 is the column header that I need to find in range A1:AT1 - cell AU3 has
a formula and will therefore update when other figures are updated.
T12 contains the result that I need.

Any suggestions?
 
G

Guest

Thank you for your response.

I realised it was something to do with the references - I was getting abit
confused. All sorted now.

Thanks again.
 

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