I used your formula to come up with a fix for the blank cells without using CSE (Ctrl + Shift + Enter)
If you have a list of items which are repeated many times, and now, you just want to know the last matching value with your specified data. For example, I have the following data range, there are duplicate product names in column A but different order numbers in column B, and I want to return the last matching value 174 of the product KTE as following screenshot shown:
Kutools for Excel collects multiple commonly used formulas, with them, you can quickly calculate age from a birthday, add years, months, weeks or days to a given date, vlookup and return the matching value from a table, and so on.
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!
To vlookup and return the certain value you need, the vlookup function will be first in your mind, but, with the vlookup function you just return the first matching value not the last. Here, I will talk about some other formulas to deal with this task.
Please enter this formula =LOOKUP(2,1/(A2:A12=D2),B2:B12) into your specified cell and press Enter key to get the last corresponding value as follows:
1. If there is no data in the last matching cell, you will get a result of 0, but that is not your need, you want the last non-zero value, in this case, you should use the following array formula: =LOOKUP(9.99999999999999E+307,IF(A2:A12=D2,IF(ISNUMBER(B2:B12),B2:B12))) and press Ctrl + Shift + Enter keys together.
2. In the above formulas, A2:A12 indicates the column that you are looking for, D2 is the value which you want to return its relative information and B2:B12 is the list that contains the value you want to return.
3. The value you are looking for is not case sensitive.