SOLVED

VLOOKUP against two columns

Brass Contributor

Hi, 

 

Please find sample data attached. 

I want to fill column C in Sheet2, using the information on Sheet1, however I am unsure how to use a VLOOKUP with two criteria's. 

 

 

6 Replies
best response confirmed by milo1234 (Brass Contributor)
Solution

@milo1234 Combine VLOOKUP with INDEX and MATCH and use structured tables in Sheet1 as well.

See attached.

 

@Riny_van_Eekelen 

 

This is my formula which displays an error message: 

 

=INDEX(Teams,MATCH([@[EpicName*]],Teams[Team],0),MATCH(VLOOKUP([@WP]],Sizes,2,FALSE),Teams[#Headers],0))

 

I have renamed the legend table 'Teams' and the T-shirt size table 'Sizes'

milo1234_0-1624355566794.png

 

@milo1234 Difficult to diagnose with the file on hand, but try this: 

 

=INDEX(Teams,MATCH([@EpicName*],Teams[Team],0),MATCH(VLOOKUP([@WP]],Sizes,2,FALSE),Teams[#Headers],0))

 

Otherwise, that the file I sent, change the table names and column headers how you have them in your actual file and see how the formula looks like then.

It doesn't like the Teams[#Headers] section. This is highlighted as the error.

@milo1234 Can't help if you don't upload the file. Sorry!

I managed to get it working, thank you.
My 'Sizes' table was not being picked up.
1 best response

Accepted Solutions
best response confirmed by milo1234 (Brass Contributor)
Solution

@milo1234 Combine VLOOKUP with INDEX and MATCH and use structured tables in Sheet1 as well.

See attached.

 

View solution in original post