How to do vlookup with multiple criteria in excel
Tutor 5 (50 Reviews)
Excel Tutor
Still stuck with a Excel question
Ask this expertAnswer
VLOOKUP in Excel does not natively support multiple criteria. A workaround involves creating a helper column that combines all criteria into a single key. This key is then used for the VLOOKUP.
Step 1: Combine the criteria into a helper column
-
Insert a new column in your lookup table.
-
Concatenate the multiple criteria for each row. For example, if your table has
First Namein column A andLast Namein column B, use the formula:=A2&B2
-
Drag the formula down the entire column to create a unique key for each row.
Step 2: Combine the criteria in the lookup value
-
In the cell where you want the result, combine the same criteria from the lookup values. For example, if the first name is in F2 and last name is in G2:
=F2&G2
-
This creates a matching key similar to the helper column.
Step 3: Use VLOOKUP with the helper column
-
Use the VLOOKUP function referencing the helper column. Example:
=VLOOKUP(F2&G2, A2:D100, 4, FALSE)
-
F2&G2is the combined lookup value. -
A2:D100is the table range, including the helper column. -
4is the column number from which to return the value. -
FALSEensures an exact match.
Step 4: Considerations for Mac vs Windows
-
Formulas work the same on Mac and Windows.
-
Dynamic arrays like
TEXTJOINcan simplify combining criteria:=TEXTJOIN("-", TRUE, A2, B2)
This formula creates a unique key with a separator, reducing potential mismatches.
Alternative using INDEX and MATCH
For advanced users, using INDEX and MATCH avoids a helper column. Example for two criteria:
=INDEX(D2:D100, MATCH(1, (A2:A100=F2)*(B2:B100=G2), 0))
-
Press Ctrl+Shift+Enter in older Excel versions to make it an array formula.
-
This returns the value in column D where both criteria match.
Tips and best practices
-
Use a separator like
"-"in concatenation to prevent accidental matches. -
Ensure data types match (numbers stored as text can break the match).
-
Sort is not necessary because exact match (
FALSE) is used. -
For large datasets, INDEX-MATCH is faster than VLOOKUP with a helper column.
This method allows precise lookups when multiple conditions must be satisfied simultaneously, maintaining accuracy in complex tables.
. Was this Helpful?Get Online Tutoring or Questions answered by Experts.
You can post a question for a tutor or set up a tutoring session
Answers · 1
Why is today function not working
Answers · 1
How to extract date from datetime in excel
Answers · 1
Why is the date value not working
Answers · 1
How to create a date formula
Answers · 1