Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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

Vlookup value with multiple criteria with SUMPRODUCT function

Vlookup value with multiple criteria with INDEXT and MATCH function


arrow blue right bubble 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:

doc-lookup-multiple-criteria-1

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:

doc-lookup-multiple-criteria-1


arrow blue right bubble 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:

doc-lookup-multiple-criteria-1


arrow blue right bubble 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:

doc-lookup-multiple-criteria-1

Notes:

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 :

  • =LOOKUP(2,1/(A2:A10=G2)/(B2:B10=G3)/(C2:C10=G4),(D2:D10))
  • =SUMPRODUCT((A2:A10=G2)*(B2:B10=G3)*(C2:C10=G4)*(D2:D10))
  • =INDEX(D2:D10,MATCH(1,(A2:A10=G2)*(B2:B10=G3)*(C2:C10=G4),0))

  • Related articles:

    How to vlookup values across multiple worksheets?

    How to vlookup to return blank instead of 0 or N/A in Excel?

    How to vlookup to get the row number in Excel?


    Recommended Productivity Tools

    Ribbon of Excel (with Kutools for Excel installed)

    300+ Advanced Features Increase Your Productivity by 71%, and Help You To Stand Out From Crowd!

    Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 82% Excel problems.

    •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
    •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
    •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
    •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
    •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
    •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
    •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
    •  Change the way you work now, and give you a better life immediately!

    Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

    • Increases your productivity by 50% when viewing and editing multiple documents.
    • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
    • Open and create documents in new tabs of same window, rather than in new windows.
    • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
    Say something here...
    symbols left.
    You are guest ( Sign Up? )
    or post as a guest, but your post won't be published automatically.
    Loading comment... The comment will be refreshed after 00:00.
    • To post as a guest, your comment is unpublished.
      Asa · 10 months ago
      you are too genius, you solve my issue.
    • To post as a guest, your comment is unpublished.
      Israel · 1 years ago
      This 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.
        Jasper · 11 months ago
        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 ;)
    • To post as a guest, your comment is unpublished.
      Joseph · 2 years ago
      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.
    • To post as a guest, your comment is unpublished.
      Moses · 3 years ago
      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.
      • To post as a guest, your comment is unpublished.
        Jacob · 2 months ago
        =LOOKUP(2,1/(A2:A10=G2)/(B2:B10=G3),(D2:D10)) what does the 2 mean?