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 find the first, 2nd or nth match value in Excel?

Supposing you have two columns with Products and quantities as below screenshot shown. For quickly finding out the quantities of the first or second banana, what would you do?

Here the vlookup function can help you deal with this problem. In this article, we will show you how to vlookup find the first, second or the nth match value with the Vlookup function in Excel.

Vlookup find the first, 2nd or nth match value in Excel with formula

Easily vlookup find the first match value in Excel with Kutools for Excel


Combine multiple worksheets/workbooks into one worksheet / workbook:

Combine multiple worksheets or workbooks into one single worksheet or workbook may be a huge task in your daily work. But, if you have Kutools for Excel, its powerful utility – Combine can help you quickly combine multiple worksheets, workbooks into one worksheet or workbook. Download the full feature 60-day free trail of Kutools for Excel now!

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download the free trial Now!

Excel Productivity Tools

Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial

Kutools for Excel: Save 70% of your time and solve 80% Excel problems for you. 300+ advanced features designed for 1500+ work scenario, make Excel much easy and increase productivity immediately. 60-day Unlimited Free Trial


arrow blue right bubble Vlookup find the first, 2nd or nth match value in Excel

Please do as follows to find the first, 2nd or nth match value in Excel.

1. In cell D1, enter the criteria which you want to vlookup, here I enter Banana.

2. Here we will find the first match value of banana. Select a blank cell such as E2, copy and paste formula =INDEX($B$2:$B$6,MATCH(TRUE,EXACT($D$1,$A$2:$A$6),0)) into the Formula Bar, and then press Ctrl + Shift + Enter keys simultaneously.

Note: In this formula, $B$2:$B$6 is the range of the matching values; $A$2:$A$6 is the range with all the criteria for vlookup; $D$1 is the cell containing the specified vlookup criteria.

Then you will get the first match value of banana in cell E2. With this formula, you can only get the first corresponding value based on your criteria.

To get any nth relative values, you can apply the following formula: =INDEX($B$2:$B$6,SMALL(IF($D$1=$A$2:$A$6,ROW($A$2:$A$6)-ROW($A$2)+1),1)) + Ctrl + Shift + Enter keys together, this formula will return the first matched value.

Notes:

1. To find the second match value, please change the above formula to =INDEX($B$2:$B$6,SMALL(IF($D$1=$A$2:$A$6,ROW($A$2:$A$6)-ROW($A$2)+1),2)), and then press Ctrl + Shift + Enter keys simultaneously. See screenshot:

2. The last number in the above formula means the nth match value of the vlookup criteria. If you change it to 3, it will get the third match value, and change to n, the nth match value will be found out.


arrow blue right bubble Vlookup find the first match value in Excel with Kutools for Excel

You can easily find the first match value in Excel without remembering formulas with the Look for a value in list formula formula of Kutools for Excel.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

1. Select a cell for locating the first matching value (says cell E2), and then click Kutools > Formula Helper > Look for a value in list. See screenshot:

doc vlookup return adjacent next cell 010

2. In the Formula Helper dialog box:

1). In the Table_array box, select the table which contains the first matching value values.

2). Specify cell (cell D1) which contains the criteria you need to lookup in the Look_value box.

3). Select the column with the first matching value in the Column box, and finally click the OK button.

Now the corresponding cell value will be auto-populated in cell C10 based on drop-down list selection.

Tip.If you want to have a free trial of this utility, please go to download the software freely first, and then go to apply the operation according above steps.


Office Tab - Tabbed Browsing, Editing, and Managing of Workbooks in Excel:

Office Tab brings the tabbed interface as seen in web browsers such as Google Chrome, Internet Explorer new versions and Firefox to Microsoft Excel. It will be a time-saving tool and irreplaceble in your work. See below demo:

Click for free trial of Office Tab!

Office Tab for Excel


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, 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 80% 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.
    Mark Rashleigh · 2 months ago
    If the first or any of the other entry's for 'banana' column B was blank cell, of which I don't require this number, what changes are required to this formula to skip blank cell in column B.
    • To post as a guest, your comment is unpublished.
      Mark Rashleigh · 2 months ago
      Sorry I am using this formula
      =INDEX($B$2:$B$6,SMALL(IF($D$1=$A$2:$A$6,ROW($A$2:$A$6)-ROW($A$2)+1),1))
      • To post as a guest, your comment is unpublished.
        Mark Rashleigh · 2 months ago
        SOLVED:
        =SMALL(IF(A2:A7=D1,IF(B2:B7<>"",B2:B7)),1)

        If 2nd or 3rd number required exchange ),1) to 2 or 3

        This formula does not require index, as it directly looks at the value in Cell
        • To post as a guest, your comment is unpublished.
          Mark Rashleigh · 2 months ago
          Correction to previous formula:
          The value was reading either the lesser or greater.

          Updated formula
          =INDEX($B$2:$B$7,SMALL(IF($A2:$A6=$D$1,IF($B$2:$B$7<>"",ROW($A2:$A6)-ROW($A2)+1)),1))

          This skips blank cell and places value of non blank cell. Replace +1 with +2 or +3 for 2nd or 3rd value
  • To post as a guest, your comment is unpublished.
    JAntonio · 4 months ago
    And if you want the last, second last, nth last just add a counter (count the number of events already hapenned) to the end and subtract it by 0,1,n respectively.

    Thank you so much! I was searching for this for a long time
    • To post as a guest, your comment is unpublished.
      crystal · 3 months ago
      Good Day,
      Sorry can't help you with this yet. Thank you for your comment.
  • To post as a guest, your comment is unpublished.
    Seth · 4 months ago
    Is it possible to find an average of the non-unique data. Or would it be possible to have a list dropdown on the cell of the various values?
    • To post as a guest, your comment is unpublished.
      crystal · 3 months ago
      Good Day,
      Sorry can't help you with this yet. Thank you for your comment.
  • To post as a guest, your comment is unpublished.
    Santosh · 5 months ago
    if a member was called on 1st October (October Data Set)as and it wasn’t revived, again the cce called him on 15th November(November Data Set). The member is revived on 16th November. While checking the revival using VLookup it makes YES to both the entries of October & November. How to avoid like it should show “YES” for the November entry actually when it was revived, and also leave the October entry as “NO”.
  • To post as a guest, your comment is unpublished.
    Sim Van Narith · 9 months ago
    Dear Ms/Mr,

    I have a problem:
    I knew a quantities of the product, I want to finding out the product name of the first or second match value of 200, what would you do?
    Big Thanks !

    Sim Van Narith
    • To post as a guest, your comment is unpublished.
      crystal · 9 months ago
      Good day,
      Supposing the value of 200 locates in cell F2, please try this formula: =VLOOKUP(F2,IF({1,0},$B$2:$B$7,$A$2:$A$7),2,0).
      Hope it can help. Thanks for your comment.