3 value lookup

Johnboy28

Board Regular
Joined
Jun 22, 2013
Messages
198
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
  5. 2010
Platform
  1. Windows
Hi, I require a formula to match Day, SO Number & product Code to return invoiced Weight?

Thank you

[TABLE="width: 1042"]
<tbody>[TR]
[TD="align: center"]Day[/TD]
[TD="align: center"]SO Number[/TD]
[TD="align: center"]Product Code[/TD]
[TD="align: center"]Invoiced Weight[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Day[/TD]
[TD="align: center"]SO Number[/TD]
[TD="align: center"]Product Code[/TD]
[TD="align: center"]Invoiced Weight[/TD]
[/TR]
[TR]
[TD="align: center"]29/01/2019[/TD]
[TD="align: center"]SO-291420[/TD]
[TD="align: center"]26102[/TD]
[TD="align: center"]19040[/TD]
[TD="align: center"][/TD]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293830[/TD]
[TD="align: center"]20502[/TD]
[TD="align: center"] ??[/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-292253[/TD]
[TD="align: center"]10400[/TD]
[TD="align: center"]168[/TD]
[TD="align: center"][/TD]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293830[/TD]
[TD="align: center"]10519[/TD]
[TD="align: center"] ??[/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-292253[/TD]
[TD="align: center"]10401[/TD]
[TD="align: center"]168[/TD]
[TD="align: center"][/TD]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293917[/TD]
[TD="align: center"]20700[/TD]
[TD="align: center"] ??[/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293830[/TD]
[TD="align: center"]20502[/TD]
[TD="align: center"]117[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293830[/TD]
[TD="align: center"]21617[/TD]
[TD="align: center"]698[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293830[/TD]
[TD="align: center"]21618[/TD]
[TD="align: center"]151[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293830[/TD]
[TD="align: center"]82100[/TD]
[TD="align: center"]1012[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293830[/TD]
[TD="align: center"]10331[/TD]
[TD="align: center"]190[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293830[/TD]
[TD="align: center"]10519[/TD]
[TD="align: center"]45[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293917[/TD]
[TD="align: center"]20039[/TD]
[TD="align: center"]120[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]30/01/2019[/TD]
[TD="align: center"]SO-293917[/TD]
[TD="align: center"]20700[/TD]
[TD="align: center"]115[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]

 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Exactly. That may or may not be what is required. Sometimes you may need the first 'hit' from the top (use index match), sometimes the last (use lookup) and sometimes a sum (sumproduct or sumifs).

I knew about the index match returning the first instance, but did not know that lookup returned the last! That's good to know.

I suppose there would be issues if there were more than 2 cases of uniqueness and you need one of the middle cases? Then more criteria would be required?
 
Upvote 0

Book1
ABCDEFGHI
1DaySO NumberProduct CodeInvoiced WeightDaySO NumberProduct CodeInvoiced Weight
21/29/2019SO-29142026102190401/30/2019SO-29383020502117
31/30/2019SO-292253104001681/30/2019SO-2938301051945
41/30/2019SO-292253104011681/30/2019SO-29391720700115
51/30/2019SO-29383020502117
61/30/2019SO-29383021617698
71/30/2019SO-29383021618151
81/30/2019SO-293830821001012
91/30/2019SO-29383010331190
101/30/2019SO-2938301051945
111/30/2019SO-29391720039120
121/30/2019SO-29391720700115
Sheet1


In I2 control+shift+enter, not just enter, and copy down:

=INDEX($D$2:$D$12,MATCH($H2,IF($A$2:$A$12=$F2,IF($B$2:$B$12=$G2,$C$2:$C$12)),0))
 
Upvote 0
or simply sum all the values that match all 3 criteria

Excel 2016 (Windows) 32 bit
[Table="width:, class:head"][tr=bgcolor:#E0E0F0][th] [/th][th]
A
[/th][th]
B
[/th][th]
C
[/th][th]
D
[/th][th]
E
[/th][th]
F
[/th][th]
G
[/th][th]
H
[/th][th]
I
[/th][th]
J
[/th][th]
K
[/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
1
[/td][td]
Day
[/td][td]
SO Number
[/td][td]
Product
Code
[/td][td]
Invoiced
Weight
[/td][td]
.
[/td][td]
.
[/td][td]
Day
[/td][td]
SO Number
[/td][td]
Product
Code
[/td][td]
Invoiced
Weight
[/td][td]
formula
in J2 copied down
[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
2
[/td][td]
29/01/2019​
[/td][td]
SO-291420​
[/td][td]
26102​
[/td][td]
19040​
[/td][td]
[/td][td]
[/td][td]
30/01/2019​
[/td][td]
SO-293830​
[/td][td]
20502​
[/td][td]
117
[/td][td] =SUMIFS(D:D,A:A,G2,B:B,H2,C:C,I2)[/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
3
[/td][td]
30/01/2019​
[/td][td]
SO-292253​
[/td][td]
10400​
[/td][td]
168​
[/td][td]
[/td][td]
[/td][td]
30/01/2019​
[/td][td]
SO-293830​
[/td][td]
10519​
[/td][td]
45
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
4
[/td][td]
30/01/2019​
[/td][td]
SO-292253​
[/td][td]
10401​
[/td][td]
168​
[/td][td]
[/td][td]
[/td][td]
30/01/2019​
[/td][td]
SO-293917​
[/td][td]
20700​
[/td][td]
115
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
5
[/td][td]
30/01/2019​
[/td][td]
SO-293830​
[/td][td]
20502​
[/td][td]
117​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
6
[/td][td]
30/01/2019​
[/td][td]
SO-293830​
[/td][td]
21617​
[/td][td]
698​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
7
[/td][td]
30/01/2019​
[/td][td]
SO-293830​
[/td][td]
21618​
[/td][td]
151​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
8
[/td][td]
30/01/2019​
[/td][td]
SO-293830​
[/td][td]
82100​
[/td][td]
1012​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
9
[/td][td]
30/01/2019​
[/td][td]
SO-293830​
[/td][td]
10331​
[/td][td]
190​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
10
[/td][td]
30/01/2019​
[/td][td]
SO-293830​
[/td][td]
10519​
[/td][td]
45​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
11
[/td][td]
30/01/2019​
[/td][td]
SO-293917​
[/td][td]
20039​
[/td][td]
120​
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td]
[/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td=bgcolor:#E0E0F0]
12
[/td][td]
30/01/2019​
[/td][td]
SO-293917​
[/td][td]
20700​
[/td][td]
115​
[/td][td]
[/td][td]
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]
[Table="width:, class:grid"][tr][td]Sheet: Sheet3[/td][/tr][/table]
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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