Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

double vlookup?

Posted on 2014-12-31
10
Medium Priority
?
136 Views
Last Modified: 2014-12-31
Hi,

Looking for a formula that will match the contents of two columns instead of just one as in a standard vlookup

Example:
Sheet1 has A,B,C
Sheet2 has A,B

I want to pull C from Sheet1 into C of Sheet2 for every row where both A and B match on both sheets.

Thanks in advance,

swjtx99
0
Comment
Question by:swjtx99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 18

Expert Comment

by:Simon
ID: 40525599
Use an intermediate formula (=A1& "_"&B1) on both sheets to concatenate columns A&B and then use that as the key for the vlookup
0
 
LVL 11

Expert Comment

by:Wilder1626
ID: 40525605
Try this eexample below.

Just adjust based on your excel file.

=VLOOKUP(A1&B1,$D1:$F26,3,0)

Open in new window

0
 
LVL 27

Accepted Solution

by:
ProfessorJimJam earned 1500 total points
ID: 40525606
=index(sheet1!C:C,match(A1&b1,sheet2A:A&Sheet2!B:B,0))  press control shift enter
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:swjtx99
ID: 40525715
Hi ProfessorJimJam,

I think your formula is what I need but having a little trouble. Everytime I hit Cntrl Shift Enter, it opens a file explorer box with a heading of "Update Values: PL" and I hit cancel then another opens with the header "Update Values: List" I hit cancel again but not getting the results expected.

Thanks,

swjtx99
0
 

Author Comment

by:swjtx99
ID: 40525723
Attached is an example sheet.Example.xlsx
0
 

Author Comment

by:swjtx99
ID: 40525745
Sorry, that was the wrong example sheet.
Example.xlsx
0
 

Author Closing Comment

by:swjtx99
ID: 40525796
Hi ProfessorJimJam,

I got your formula to work by adding ' to the sheet names and by adding ! to the first reference for Sheet2 as below

=INDEX('Sheet1'!C:C,MATCH(A2&B2,'Sheet2'!A:A&'Sheet2'!B:B,0))

Thanks for your help

swjtx99
0
 

Author Comment

by:swjtx99
ID: 40525823
Hi ProfessorJimJam,

Actually, this isn't working after all. Looks like it depends on the sort order to return the right value so it's not really "matching". Am I missing something?

To further explain. for the formula in Row 3, I get the value from sheet 1 row 3, not the row where the match was made.

Thanks,

swjtx99
0
 
LVL 27

Expert Comment

by:ProfessorJimJam
ID: 40525882
check the attached file
Example.xlsx
0
 

Author Comment

by:swjtx99
ID: 40525911
Hi ProfessorJimJam,

This worked. I wasn't sure you'd look again at this since it was accepted so I submitted another question and got a different answer that also works so better to have 2 than none!

Thanks for the follow-up,

Regards,

swjtx99
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question