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

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • 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.

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?


    Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

    • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
    • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
    • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
    • 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.
    kte tab 201905

    Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

    • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
    • Open and create multiple documents in new tabs of the same window, rather than in new windows.
    • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
    officetab bottom
    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.
      ACHINTA K PANDE · 4 months ago
      The 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.
      Asa · 1 years 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 · 1 years 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 · 9 months ago
        =LOOKUP(2,1/(A2:A10=G2)/(B2:B10=G3),(D2:D10)) what does the 2 mean?