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?
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.
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:
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:
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:
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 :
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 8 months agoThe lookup will not work if there is a formula in the cell, what is the remedy ??
- To post as a guest, your comment is unpublished.· 1 years agoyou are too genius, you solve my issue.
- To post as a guest, your comment is unpublished.· 2 years agoThis is an elegant formula, also easily expansible to more criteria. The one donwside of INDEX+MATCH formulas is that it's really slow in larger datasets.
- To post as a guest, your comment is unpublished.· 1 years agoIndex 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 ;)
- To post as a guest, your comment is unpublished.· 3 years agoThanks 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.
- To post as a guest, your comment is unpublished.· 3 years agoHello, 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.
- To post as a guest, your comment is unpublished.· 1 years ago=LOOKUP(2,1/(A2:A10=G2)/(B2:B10=G3),(D2:D10)) what does the 2 mean?