VLOOKUP based on 2 or 3 conditions....

Waxaholic

Board Regular
Joined
Apr 2, 2002
Messages
72
I have the following lookup table:

Col-1 Col-2 Col-3 Col-4
1 159 0 1
1 138 0 2
1 305 0 3
1 412 0 4
2 119 1 0
2 205 1 1
2 333 1 2

On another sheet i have a grid with the following:

Cell A1 is reference.

Col-2 Col-3 Col-4
? 0 1
? 0 2
? 1 1

Suppose the reference (A1) had a value of 1. I want to be able to lookup 1 (ref value) and 0 (col-3 grid) and 1 (col-4 grid)in the Lookup Table (col-1) and match it across with col-3 and Col-4 (lookup table), returning a value of 159 (col-2 lookup table) to the grid (col-2). I hope that makes sense. Can someone point me to an example or direct me to the correct formulas to accomplish this.

Thank you,

Waxaholic
This message was edited by Waxaholic on 2002-04-09 09:54
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
On 2002-04-09 09:29, Waxaholic wrote:
I have the following lookup table:

Col-1 Col-2 Col-3
1 159 1
1 138 2
1 305 3
1 412 4
2 119 0
2 205 1
2 333 2

On another sheet i have a grid with the following:

Cell A1 is reference.

Col-2 Col-3
? 1
? 2
? 3

Suppose the reference (A1) had a value of 1. I want to be able to lookup 1 (ref value) and 1 (col-3 grid) in the Lookup Table (col-1) and match it across with col-3 (lookup table), returning a value of 159 (col-2 lookup table) to the grid (col-2). I hope that makes sense. Can someone point me to an example or direct me to the correct formulas to accomplish this.

Thank you,

Waxaholic

Try this (Sheet2 is your lookup sheet, with the data in cells A1:C7):

=SUMPRODUCT((Sheet2!A1:A7=A1)*(Sheet2!C1:C7=C1)*(Sheet2!B1:B7))

HTH,

Russell
 
Upvote 0
Sorry but i omitted a couple columns in the original post. I just finished editing it and seen that you had already posted a solution for the initial posting. Would the same apply having to refernece 3 values?
 
Upvote 0
When you tried extending the formula, what problem did you encounter?
 
Upvote 0
Got it. Fantastic. Just had to sit back and think about it for a few minutes there. Thank you very much.

Waxaholic
 
Upvote 0

Forum statistics

Threads
1,214,784
Messages
6,121,536
Members
449,037
Latest member
tmmotairi

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