Tim Wilkinson
Tim Wilkinson

Reputation: 3801

Excel VLOOKUP from multiple conditions

I am looking for a VLOOKUP style function that matches multiple criteria from a table of information. Easier to explain with examples. Imagine a database like this in a sheet called data,

  A    B    C    D    E
1     UK   EU   PL   FR
2 P1  10   10   20   20
3 P2  15   15   25   25
4 P3  30   30   40   40

And a list of values with desired outcome such as,

      A   B            C
1    P1  UK   =*should return 10*
2    P1  EU   =*should return 10*
3    P3  PL   =*should return 40*
4    P2  UK   =*should return 15*

Does anyone know how to achieve this?

Upvotes: 1

Views: 488

Answers (1)

pnuts
pnuts

Reputation: 59442

Please try:

=VLOOKUP(A1,Sheet1!$A$1:$E$4,MATCH(B1,Sheet1!$A$1:$E$1,0),0)  

(For details see TechOnTheNet.)

Upvotes: 1

Related Questions