Conditional VLOOKUP?

brooklyn2007

Board Regular
Joined
Nov 20, 2010
Messages
143
Hello guys. I have this question. Let say cell A1 is John, cell B1 is White, cell C1 is 235. Also lets say cell A2 is also John, cell B2 is Brown, cell C2 is 124.

I need a VLOOKUP formula that would look the value for the condition in the range A to be John and range B to be White. In this case the right result would be 235.

I have a large set of data and each of them repeat twice in the range A with the same name, but different names in range B. In range B I have cells with only two different names which are called (lets say) either X or Y. Range C has different values. I want to make a selection for what kind of data I'm looking for.

Thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hello guys. I have this question. Let say cell A1 is John, cell B1 is White, cell C1 is 235. Also lets say cell A2 is also John, cell B2 is Brown, cell C2 is 124.

I need a VLOOKUP formula that would look the value for the condition in the range A to be John and range B to be White. In this case the right result would be 235.

I have a large set of data and each of them repeat twice in the range A with the same name, but different names in range B. In range B I have cells with only two different names which are called (lets say) either X or Y. Range C has different values. I want to make a selection for what kind of data I'm looking for.

Thanks
E1: John

F1: White

G1, control+shift+enter, not just enter:

Either...

=INDEX($C$1:$C$100,MATCH(1,IF($A$1:$A$100=E1,IF($B$1:$B$100,1)),0))

Or...

=INDEX($C$1:$C$100,MATCH(F1,IF($A$1:$A$100=E1,$B1:$B$100,0),0))
 
Upvote 0
Hi brooklyn2007,

If the structure is as below, maybe the following formula in G2 works for you:
Excel Workbook
ABCDEFG
1JohnWhite235Name to look upLast NameResult
2JohnBrown124JohnWhite235
3
4
...
Cell Formulas
RangeFormula
G2=SUMPRODUCT(($A$1:$A$20=$E$2)*($B$1:$B$20=$F$2)*$C$1:$C$20)


Hope this helps.

Regards.
 
Upvote 0
Thanks guys for you help :). I think the SUMPRODUCT formula will be better since it does not kill my pc proccesor compared to the INDEX & MATCHING
 
Upvote 0
Thanks guys for you help :). I think the SUMPRODUCT formula will be better since it does not kill my pc proccesor compared to the INDEX & MATCHING

How do you mean? Also, if there are multiple co-occurrences, SumProduct won't give you the right answer unless you want to sum.
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,911
Members
452,949
Latest member
beartooth91

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