Vlookup with different criteria

phiero21

Board Regular
Joined
Sep 20, 2007
Messages
136
Hi,

I want to do a vlookup with 2 different criterias. I am able to achieve the result by either using a helper column or by using array formulae. Is there any way, this can be done without either of the two (without additional column or array formulae)

E.g. Here is my data set:

A 1 Ash
B 2 Bob
C 3 Cat

My Conditions are
B 2 (in 2 different cells).

I am looking for "Bob" as the output
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try:
Code:
=IF(MATCH(E1,$A$1:$A$3)=MATCH(F1,$B$1:$B$3),VLOOKUP(E1,$A$1:$C$3,3,0),"No Match")
 
Upvote 0
phieiro21, Good afternoon.

You can also use another formula if you wish.

=INDIRECT("C" & SUMPRODUCT((A1:A10=D1)*(B1:B10=E1)*ROW(C1:C10)),1)

Is that what you want?
Hope it helps.
 
Upvote 0
Its working only for unique record, If anything repeat is there then this formula is not working, for example down the given range I am adding B 5 dog and updating the range then not working.
 
Upvote 0
Its working only for unique record, If anything repeat is there then this formula is not working, for example down the given range I am adding B 5 dogand updating the range then not working.
 
Upvote 0
phieiro21, Good afternoon.

You can also use another formula if you wish.

=INDIRECT("C" & SUMPRODUCT((A1:A10=D1)*(B1:B10=E1)*ROW(C1:C10)),1)

Is that what you want?
Hope it helps.

Thanks. I like how you did this with Indirect. That's something I thought of but couldn't quite get it right.
 
Upvote 0
Thanks, works pefectly

Now I understand what Jitendra is saying. The formulae is not working if the data set contains duplicates in Column A.

However, the solution provided by Marcílio_Lobão is still working fine. Thanks for taking time though. DO let me know if your solution can be modified to include duplicate values as well.
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,539
Members
449,169
Latest member
mm424

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top