Johnboy28

Board Regular
Joined
Jun 22, 2013
Messages
172
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

DaySO NumberProduct CodeInvoiced WeightDaySO NumberProduct CodeInvoiced Weight
29/01/2019SO-291420261021904030/01/2019SO-29383020502 ??
30/01/2019SO-2922531040016830/01/2019SO-29383010519 ??
30/01/2019SO-2922531040116830/01/2019SO-29391720700 ??
30/01/2019SO-29383020502117
30/01/2019SO-29383021617698
30/01/2019SO-29383021618151
30/01/2019SO-293830821001012
30/01/2019SO-29383010331190
30/01/2019SO-2938301051945
30/01/2019SO-29391720039120
30/01/2019SO-29391720700115

<tbody>
</tbody>

 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Here is one option:

=LOOKUP(2,1/(($A$2:$A$12=F2)*($B$2:$B$12=G2)*($C$2:$C$12=H2)),$D$2:$D$12)
 
Upvote 0
One way
- add a helper column containing concatenation of the 3 values
- use Index & Match

like this

Excel 2016 (Windows) 32 bit
A
B
C
D
E
F
G
H
I
J
K
1
Day
SO Number
Product
Code
Invoiced
Weight
Helper Column
formula
in E2 copied down
Day
SO Number
Product
Code
Invoiced
Weight
formula
in J2 copied down
2
29/01/2019​
SO-291420​
26102​
19040​
43494|SO-291420|26102
=A2&"|"&B2&"|"&C2
30/01/2019​
SO-293830​
20502​
117
=INDEX(D:D,MATCH(G2&"|"&H2&"|"&I2,E:E,0))
3
30/01/2019​
SO-292253​
10400​
168​
43495|SO-292253|10400
30/01/2019​
SO-293830​
10519​
45
4
30/01/2019​
SO-292253​
10401​
168​
43495|SO-292253|10401
30/01/2019​
SO-293917​
20700​
115
5
30/01/2019​
SO-293830​
20502​
117​
43495|SO-293830|20502
6
30/01/2019​
SO-293830​
21617​
698​
43495|SO-293830|21617
7
30/01/2019​
SO-293830​
21618​
151​
43495|SO-293830|21618
8
30/01/2019​
SO-293830​
82100​
1012​
43495|SO-293830|82100
9
30/01/2019​
SO-293830​
10331​
190​
43495|SO-293830|10331
10
30/01/2019​
SO-293830​
10519​
45​
43495|SO-293830|10519
11
30/01/2019​
SO-293917​
20039​
120​
43495|SO-293917|20039
12
30/01/2019​
SO-293917​
20700​
115​
43495|SO-293917|20700
Sheet: Sheet1
 
Upvote 0
or use and ARRAY formula in J2 copied down
=INDEX(D:D,MATCH(1,(G2=A:A)*(H2=B:B)*(I2=C:C),0))

an array formula is committed with {CTRL}{SHIFT}{ENTER}
see worksheet below- the formula is automatically enclosed in curly brackets like this {=INDEX(D:D,MATCH(1,(G2=A:A)*(H2=B:B)*(I2=C:C),0))}
inserting them manually does not work!

Excel 2016 (Windows) 32 bit
A
B
C
D
E
F
G
H
I
J
K
1
Day
SO Number
Product
Code
Invoiced
Weight
.
.
Day
SO Number
Product
Code
Invoiced
Weight
ARRAY formula
in J2 copied down
2
29/01/2019​
SO-291420​
26102​
19040​
30/01/2019​
SO-293830​
20502​
117
{=INDEX(D:D,MATCH(1,(G2=A:A)*(H2=B:B)*(I2=C:C),0))}
3
30/01/2019​
SO-292253​
10400​
168​
30/01/2019​
SO-293830​
10519​
45
4
30/01/2019​
SO-292253​
10401​
168​
30/01/2019​
SO-293917​
20700​
115
5
30/01/2019​
SO-293830​
20502​
117​
6
30/01/2019​
SO-293830​
21617​
698​
7
30/01/2019​
SO-293830​
21618​
151​
8
30/01/2019​
SO-293830​
82100​
1012​
9
30/01/2019​
SO-293830​
10331​
190​
10
30/01/2019​
SO-293830​
10519​
45​
11
30/01/2019​
SO-293917​
20039​
120​
12
30/01/2019​
SO-293917​
20700​
115​
Sheet: Sheet2
 
Upvote 0
Another option using SUMPRODUCT:

Code:
=SUMPRODUCT(($A$2:$A$12=F2)*($B$2:$B$12=G2)*($C$2:$C$12=H2)*($D$2:$D$12))
 
Upvote 0
Another option using SUMPRODUCT:

Code:
=SUMPRODUCT(($A$2:$A$12=F2)*($B$2:$B$12=G2)*($C$2:$C$12=H2)*($D$2:$D$12))

You would have to be absolutely sure each one was unique or its going to sum them up and get wrong answers. However you could then use SUMIFS also.
 
Upvote 0
You would have to be absolutely sure each one was unique or its going to sum them up and get wrong answers. However you could then use SUMIFS also.

Good spot! I'd imagine if they weren't all unique then the invoiced weight could be a variety of numbers though? It would be impossible (based on the given criteria) to generate a single solution as it could be either A or B etc!
 
Upvote 0
By not being unique i mean if, for example, the first line was repeated further down but with a different weight then you would sum those two weights with sumproduct or sumifs.
 
Upvote 0
By not being unique i mean if, for example, the first line was repeated further down but with a different weight then you would sum those two weights with sumproduct or sumifs.

Right, I see! Like this then:

ABCDEFGHI
1DaySO NumberProduct CodeInvoiced WeightDaySO NumberProduct CodeInvoiced Weight
229/01/2019SO-291420261021904029/01/2019SO-2914202610219100
330/01/2019SO-2922531040016830/01/2019SO-29225310400168
429/01/2019SO-2914202610260

<tbody>
</tbody>
 
Upvote 0
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).
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,361
Members
449,080
Latest member
Armadillos

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