Look up with multiple criteria - Index Match?

soilwork6

New Member
Joined
May 10, 2017
Messages
18
Please help. I would like a lookup function using sheet2 to look up the price for Apples on 1/31/17 in D2 and the Pears in D3. Pears should return .45 and Apples .34. I don't think I can easily use vlookup because of the multiple criteria? Thanks!!!

Sheet 1
2b56d6c1-fb44-4eb1-8e46-1f7d2b24035f


Sheet 2
98b90b60-4406-492e-a769-f3f4e8798fb9
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Sorry about the screen shots in prior posts

SHEET 1

[TABLE="width: 522"]
<tbody>[TR]
[TD="width: 87"][TABLE="width: 522"]
<tbody>[TR]
[TD="width: 87"][/TD]
[TD="class: xl64, width: 87"]A[/TD]
[TD="class: xl64, width: 87"]B[/TD]
[TD="class: xl64, width: 87"]C[/TD]
[TD="class: xl64, width: 87"]D[/TD]
[TD="class: xl64, width: 87"]E[/TD]
[/TR]
[TR]
[TD="class: xl63"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD]Quantity[/TD]
[TD]Price[/TD]
[TD]Total Cost[/TD]
[/TR]
[TR]
[TD="class: xl63"]2[/TD]
[TD="class: xl65"]1/31/17[/TD]
[TD="class: xl64"]Pears[/TD]
[TD="class: xl64"]25[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl64"]0[/TD]
[/TR]
[TR]
[TD="class: xl63"]3[/TD]
[TD="class: xl65"]1/31/17[/TD]
[TD="class: xl64"]Apples[/TD]
[TD="class: xl64"]34[/TD]
[TD="class: xl66"][/TD]
[TD="class: xl64"]0[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="class: xl63, width: 87"][/TD]
[TD="class: xl63, width: 87"][/TD]
[TD="class: xl63, width: 87"][/TD]
[TD="class: xl63, width: 87"][/TD]
[TD="class: xl63, width: 87"][/TD]
[/TR]
</tbody>[/TABLE]


SHEET 2

[TABLE="width: 348"]
<!--StartFragment--> <colgroup><col width="87" span="4" style="width:65pt"> </colgroup><tbody>[TR]
[TD="width: 87"][/TD]
[TD="class: xl64, width: 87"]A[/TD]
[TD="class: xl64, width: 87"]B[/TD]
[TD="class: xl64, width: 87"]C[/TD]
[/TR]
[TR]
[TD="class: xl63"]1[/TD]
[TD][/TD]
[TD="class: xl64"]Pears[/TD]
[TD="class: xl64"]Apples[/TD]
[/TR]
[TR]
[TD="class: xl63"]2[/TD]
[TD][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[/TR]
[TR]
[TD="class: xl63"]3[/TD]
[TD][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[/TR]
[TR]
[TD="class: xl63"]4[/TD]
[TD="align: right"]2017[/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[/TR]
[TR]
[TD="class: xl63"]5[/TD]
[TD][/TD]
[TD="class: xl64"][/TD]
[TD="class: xl64"][/TD]
[/TR]
[TR]
[TD="class: xl63"]6[/TD]
[TD="class: xl65"]1/1/17[/TD]
[TD="class: xl64"]0.45[/TD]
[TD="class: xl64"]0.34[/TD]
[/TR]
[TR]
[TD="class: xl63"]7[/TD]
[TD="class: xl65"]2/1/17[/TD]
[TD="class: xl64"]0.48[/TD]
[TD="class: xl64"]0.32[/TD]
[/TR]
[TR]
[TD="class: xl63"]8[/TD]
[TD="class: xl65"]3/1/17[/TD]
[TD="class: xl64"]0.47[/TD]
[TD="class: xl64"]0.34[/TD]
[/TR]
[TR]
[TD="class: xl63"]9[/TD]
[TD="class: xl65"]4/1/17[/TD]
[TD="class: xl64"]0.46[/TD]
[TD="class: xl64"]0.38[/TD]
[/TR]
[TR]
[TD="class: xl63"]10[/TD]
[TD="class: xl65"]5/1/17[/TD]
[TD="class: xl64"]0.43[/TD]
[TD="class: xl64"]0.39[/TD]
[/TR]
[TR]
[TD="class: xl63"]11[/TD]
[TD="class: xl65"]6/1/17[/TD]
[TD="class: xl64"]0.43[/TD]
[TD="class: xl64"]0.33[/TD]
[/TR]
<!--EndFragment--></tbody>[/TABLE]
 
Upvote 0
I think this is a little better explanation of what I'm trying to do. Sheet1 column B is the driver of what data gets looked up.

In D2 I want to look up the price for a Pear for Jan of 17 and not having to point the formula specifically at the Pears column on Sheet2. I want the formula on Sheet1 to realize what fruit is listed in the cell in column B, and B2 is Pears so go retrieve the price for Pears for Jan of 17. The formula should pull down and realize that B3 is Apples so go pull the price of Apples from Sheet2 for Jan of 17. (I realize my dates in sheet1 col A don't match Sheet2 col A but I can fix that easily). Thanks!!
 
Upvote 0
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[TD]
D
[/TD]
[TD]
E
[/TD]
[TD]
F
[/TD]
[TD]
G
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]Quantity[/TD]
[TD]Price[/TD]
[TD]Total Cost[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]
1/31/2017​
[/TD]
[TD]Pears[/TD]
[TD]
25​
[/TD]
[TD]
0.45​
[/TD]
[TD]
11.25​
[/TD]
[TD][/TD]
[TD]Sheet1[/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]
1/31/2017​
[/TD]
[TD]Apples[/TD]
[TD]
34​
[/TD]
[TD]
0.34​
[/TD]
[TD]
11.56​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]




[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[TD]
D
[/TD]
[TD]
E
[/TD]
[TD]
F
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]
1​
[/TD]
[TD][/TD]
[TD]Pears[/TD]
[TD]Apples[/TD]
[TD][/TD]
[TD]Sheet2[/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]
2​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]
3​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]
4​
[/TD]
[TD]
2017​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]
5​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]
6​
[/TD]
[TD]
1/1/2017​
[/TD]
[TD]
0.45​
[/TD]
[TD]
0.34​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
7
[/TD]
[TD]
7​
[/TD]
[TD]
2/1/2017​
[/TD]
[TD]
0.48​
[/TD]
[TD]
0.32​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
8
[/TD]
[TD]
8​
[/TD]
[TD]
3/1/2017​
[/TD]
[TD]
0.47​
[/TD]
[TD]
0.34​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
9
[/TD]
[TD]
9​
[/TD]
[TD]
4/1/2017​
[/TD]
[TD]
0.46​
[/TD]
[TD]
0.38​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
10
[/TD]
[TD]
10​
[/TD]
[TD]
5/1/2017​
[/TD]
[TD]
0.43​
[/TD]
[TD]
0.39​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
11
[/TD]
[TD]
11​
[/TD]
[TD]
6/1/2017​
[/TD]
[TD]
0.43​
[/TD]
[TD]
0.33​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]




d1=
SUMPRODUCT((MONTH(Sheet2!$B$6:$B$11)=MONTH(Sheet1!A2))*(Sheet2!$C$1:$D$1=Sheet1!B2)*(Sheet2!$C$6:$D$11)) copy down

 
Upvote 0
You can do something like this with an INDEX(MATCH(MATCH formula:

ABCDE
QuantityPriceTotal Cost
Pears
Apples

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]1/31/2017[/TD]

[TD="align: right"]25[/TD]
[TD="align: right"]0.45[/TD]
[TD="align: right"]11.25[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]1/31/2017[/TD]

[TD="align: right"]34[/TD]
[TD="align: right"]0.34[/TD]
[TD="align: right"]11.56[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]D2[/TH]
[TD="align: left"]=INDEX(Sheet2!$B$6:$C$11,MATCH(A2,Sheet2!$A$6:$A$11),MATCH(B2,Sheet2!$B$1:$C$1,0))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]E2[/TH]
[TD="align: left"]=C2*D2[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



It did help when you created the table, as opposed to trying to post images. For future reference, look at the HTML Maker in my signature, which allows you to post a screen print like I did.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,224,620
Messages
6,179,928
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