Vlookup based on two criteria

Dear Experts:

I need to do a lookup, the trouble is that the lookup values are based on two criteria (in the below example, the look-up value is 'Hongkong1000' (spread over two columns). For example:

Sheet 'Database' where the returned values are to be inserted:
Column A      Column B        Column C
Hongkong       1000               650 US-Dollar (The return value that is pulled from Column 'C' of the lookup table (worksheet named LookUpTable)


Sheet 'LookupTable from which the return values are taken:
Column A      Column B        Column C
Hongkong       1000               650 US-Dollar  (The return value that is looked up and inserted into Sheet 'Database')

I could insert a helper column which combines Column A and B on both sheets. I am aware of this, but I wonder whether another nested formula can achieve this without having to insert a helper column.

Help is very much appreciated. Thank you very much in advance for your professional help

I have attached a sample for your convenience with detailed instructions.

Regards, Andreas

Lookup_2_Criteria_Hermle.xlsx
Andreas HermleTeam leaderAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Try this.....

In D2
=IFERROR(INDEX(By_Country_By_PM!$D$2:$E$13,MATCH($A2&$B2,INDEX(By_Country_By_PM!$A$2:$A$13&By_Country_By_PM!$B$2:$B$13,0),0),MATCH(D$1,By_Country_By_PM!$D$1:$E$1,0)),"-")

Open in new window

And then copy across and down.

For details please refer to the attached workbook.
Lookup_2_Criteria_Hermle.xlsx

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ProfessorJimJamMicrosoft Excel ExpertCommented:
please find attached.
Lookup_2_Criteria_Hermle.xlsx
Andreas HermleTeam leaderAuthor Commented:
Wow, I am deeply impressed. Both formulas work just fine, one an index formula, the othe one a 'regular' formula.

I can't say which one is better, since both are just awesome for me, but regrettably I have to select 'a' better one.

Again, thank you very much for your great, professional and swift support.  I really appreciate it. Great Stuff.

Kind Regards, Andreas
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome. Glad we could help.

I am not sure whether you have noticed it or not, both the formulas have almost the same approach except the fact that mine is a non-array formula while ProfessorJimJam's is an array formula which will require confirmation with Ctrl+Shift+Enter not Enter alone.
Andreas HermleTeam leaderAuthor Commented:
upsss, sorry, I meant array formula instead of index formula.
ProfessorJimJamMicrosoft Excel ExpertCommented:
You are welcome Andreas.

Definitely, sktneer's formula is better.  avoiding entering special key stroke
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.