How to vlookup value with multiple criteria in Excel?
In Excel, we can quickly vlookup the corresponding data in a list based on a specific criterion that you set by using the vlookup function. But, if you need to vlookup the relative value based on multiple criteria, how could you deal with it?
Vlookup value with multiple criteria with LOOKUP function
Supposing I have the following data range which I want to use two criteria to return the relative value, for example, I know the product and staff name need to return their corresponding total price value in the same row:
LOOKUP function may help you solve this problem, please type this formula into a specified cell: =LOOKUP(2,1/(A2:A10=G2)/(B2:B10=G3),(D2:D10)), and press Enter key to get the correct result you would like, see screenshot:
Vlookup value with multiple criteria with SUMPRODUCT function
With the SUMPRODUCT function, you can also solve this task.
Please enter this formula: =SUMPRODUCT((A2:A10=G2)*(B2:B10=G3)*(D2:D10)) into a blank cell you specified, and tap the Enter key to return the result, see screenshot:
Vlookup value with multiple criteria with INDEXT and MATCH function
In Excel, the mixed INDEXT and MATCH function is powerful for us to vlookup values based on one or more criteria, to know this formula, do as follows:
Type this formula =INDEX(D2:D10,MATCH(1,(A2:A10=G2)*(B2:B10=G3),0)) into a blank cell, and press Ctrl + Shift + Enter keys together, then you will get the relative value as you want, see screenshot:
1. In the above formulas:
A2:A10=G2: which means to search the criteria of G2 in range A2:A10;
B2:B10=G3: means to search the criteria of G3 in range B2:B10;
D2:D10: refers to the range which you want to return the corresponding value.
2. All of the above examples show you how to use two criteria for lookups. If you have more than two criteria, you just need to add them to the formulas, such as :
Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
More than 300 powerful features. Supports Office/Excel
2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features
30-day free trial. 60-day money back guarantee.
Index match should be faster in my personal opinion. It has been tested as well by many. If uses index match in an array, definitely it will be slower since it will become like a volatile formula. The above formula uses index match in array for multiple criteria condition which actually can be change to non-array type as well ;)
Thanks for this tutorial; :-) I have a question. What formula should I used? I have a series of data in a row like A1:M1, I'd like a result that if there is/are data that is/are < or > in specific number, it will result to "Disqualified" if it's true or " " (space) if false.
Hello, Thanks for this tutorial, it's very helpful. The following formula works great. =LOOKUP(2,1/(B:B=H97)/(I:I=H98),E:E). I have a simple question.
What I want is, the cell should get the value if (H98 = open) If "open" is not there in (I:I) match (H99 = Under observation) from (I:I) and get the value, If possible get the row. I want to keep the formula as lite as possible. As I will be copying this formula in lots of cells.
Also kindly suggest which of the above formula (LOOKUP/SUMPRODUCT/INDEX) is less processor intensive.