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 matching value from bottom to top in Excel?

Normally, the Vlookup function can help you to find the data from top to bottom to get the first matching value from the list. But, sometimes, you need to vlookup from bottom to top to extract the last corresponding value. Do you have any good ideas to deal with this task in Excel?

Vlookup matching value from bottom to top with formula

Vlookup matching value from top to bottom with Kutools for Excel


Vlookup and return matching value from top to bottom:

With Kutools for Excel's Look for a value in list feature, you can quickly find and return the matching value from top to bottom in a table list.

doc vlookup bottom to top 6

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


Vlookup matching value from bottom to top with formula


To vlookup matching value from bottom to top, the following LOOKUP formula can help you, please do as follows:

Please enter this formula: =LOOKUP(2,1/($A$2:$A$19=D2),$B$2:$B$19) into a blank cell where you want to get the result, and press Enter key, the last corresponding value will be returned at once, see screenshot:

doc vlookup bottom to top 1

Note: In the above formula: A2:A19 indicates the column that you are looking for, D2 is the criteria which you want to return its relative data and B2:B19 is the list that contains the value you want to return.


Vlookup matching value from top to bottom with Kutools for Excel

The above formula can help you vlookup data from bottom to top, and this section, I will talk about how to vlookup value from top to bottom. If you have Kutools for Excel, with its Look for a value in list utility, you can quickly return the first matching value from top to bottom.

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

After installing Kutools for Excel, please do as follows:

1. Click a blank cell where you want to put the result.

2. Then click Kutools > Formulas > Look for a value in list, see screenshot:

doc vlookup bottom to top 2

3. In the Formula Helper dialog box:

(1.) Click first doc vlookup bottom to top 4 button beside Table_array to select the data range which you want to use;

(2.) Click second doc vlookup bottom to top 4 button beside Look_value to select the criteria that you want to return its corresponding value;

(3.) Click third doc vlookup bottom to top 4 button beside Column to select the column contains the value you want to return.

doc vlookup bottom to top 3

4. After finishing the settings, click Ok button, the first matching value from top has been displayed as following screenshot shown:

doc vlookup bottom to top 5

Download and free trial Kutools for Excel Now !


Demo: Vlookup matching value from top to bottom with Kutools for Excel

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


Related articles:

How to vlookup values across multiple worksheets?

How to vlookup to another workbook?

How to vlookup to return blank instead of 0 or N/A in 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.
    Sam Thackeray · 1 years ago
    Hi All,
    Are there any other ways to do this? While it works it is extremely resource intensive for large data sets.


    Thanks,
  • To post as a guest, your comment is unpublished.
    Paul · 1 years ago
    The actual value of the "2" is irrelevant, it could be any number greater than 1 and less than infinity.

    I believe the second term i.e. "1/($A$2:$A$19=D2)" creates an array by evaluating each cell in the range and if it is equal to D2 (a boolean test) it equates this to 1/TRUE, which as TRUE is 1 => 1. If it doesn't equal D2 it equates this to 1/FALSE, which as FALSE is 0 => infinity or Not a Number.

    LOOKUP then takes over and searches for 2 in this array, which of course it can't find as they are either 1 or infinity.

    If LOOKUP can't find a match it matches the highest number that is less than or equal to 2. Which is 1.

    I'm not quite sure why this turns out to be the last occurrence of 1 though. Maybe LOOKUP (unlike VLOOKUP) always searches upwards?
    • To post as a guest, your comment is unpublished.
      Mario · 10 months ago
      I do not understand either why this picks the last occurrence of 1. It works, but WHY??!!

      (Thanks, anyway!)
  • To post as a guest, your comment is unpublished.
    Charlie · 2 years ago
    Hi Please can you explain this formula "=LOOKUP(2,1/($A$2:$A$19=D2),$B$2:$B$19)".

    It's worked for what I want to acheive very well, but I do not completely understand how. When typed into Excel, it shows that "2" is the lookup value, but we are actually looking up "D2" in this formula. Also what is "1/" doing on the lookup vector?

    Please could you break this formula down to explain how it works?

    Thanks