Hello, I'm trying to compare 2 different Excel files which each contains product data and sales data. Sales data would consists of sales transactions of products that corresponds to a specific set of specifications and listed down per transaction. What I'd like to do is I'd like to understand from reconciling both files, who are the customers who are making the most purchases in terms of weight, and sort largest to smallest from the list of customers that I have.
Sample case : if I take one simple reference param (column H on reconcile sheet), say TSPFC400-0.588-1300 - 1600, I'd like for the customers column to return "PT. Persada Wijaya Sentosa" and "PT. Ferro Nusa Tata Laksana" based on a largest to smallest weight. Can anyone give some explanation on the quickest way to do this? I run this file on Excel 2016, so I have constraints on formulas that can be used.
Below is the dataset I am referring to:
A. Product sheet sample
B. Sales data sample
C. Reconcile sheet (what I got so far)
EDIT:
I think I might have caused a bit of confusion on the above question, so to clear up, what I'm struggling to do is have distinct values of the customers returned on column M - Q on reconcile sheet, instead of multiple returned values of the same customers. Secondly, I would like to be able to sort the order of those distinct values from either largest to smallest, or smallest to largest based on the weight of products purchased referring to historical sales data extracted from the Sales sheet.
Sample case : if I take one simple reference param (column H on reconcile sheet), say TSPFC400-0.588-1300 - 1600, I'd like for the customers column to return "PT. Persada Wijaya Sentosa" and "PT. Ferro Nusa Tata Laksana" based on a largest to smallest weight. Can anyone give some explanation on the quickest way to do this? I run this file on Excel 2016, so I have constraints on formulas that can be used.
Below is the dataset I am referring to:
A. Product sheet sample
BookRecon2016_rev2.xlsm | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | L | M | N | ||||||
4 | Type of product | Packing No. | Secondary spec | Thickness | Width | Weight (ton) | Inside dia. | Coating Mass | Yard Transfer Remark | Width category | Reference param | |||||
5 | CR | CR4493206 | TSPCC | 0.58 | 1502.00 | 3.500 | 610 | 0 | K | 1300 - 1600 | TSPCC-0.582-1300 - 1600 | |||||
6 | CR | CR4492974 | TSPFC400 | 0.59 | 1467.00 | 6.710 | 610 | 0 | K | 1300 - 1600 | TSPFC400-0.588-1300 - 1600 | |||||
7 | CR | CR4493055 | TSPFC400 | 0.59 | 1467.00 | 6.760 | 610 | 0 | K | 1300 - 1600 | TSPFC400-0.588-1300 - 1600 | |||||
8 | CR | CR4493094 | TSPCC | 0.60 | 1717.00 | 6.550 | 610 | 0 | K | >1600 | TSPCC-0.6->1600 | |||||
9 | CR | CR4492975 | TSPCC | 0.63 | 1382.00 | 6.320 | 610 | 0 | K | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | |||||
10 | CR | CR4493053 | TSPCC | 0.63 | 1382.00 | 6.280 | 610 | 0 | K | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | |||||
11 | CR | CR4493072 | TSPCC | 0.63 | 1667.00 | 4.340 | 610 | 0 | K | >1600 | TSPCC-0.631->1600 | |||||
12 | CR | CR4493208 | TSPCC | 0.63 | 1667.00 | 8.690 | 610 | 0 | K | >1600 | TSPCC-0.631->1600 | |||||
13 | CR | CR4493306 | TSPCC | 0.63 | 1667.00 | 8.080 | 610 | 0 | K | >1600 | TSPCC-0.631->1600 | |||||
14 | CR | CR4492651 | TSPCC | 0.64 | 1218.50 | 9.430 | 610 | 0 | K | ~1300 | TSPCC-0.637-~1300 | |||||
15 | CR | CR4492657 | TSPCC | 0.64 | 1298.50 | 3.180 | 610 | 0 | K | ~1300 | TSPCC-0.637-~1300 | |||||
16 | CR | CR4492661 | TSPCC | 0.64 | 1298.50 | 4.180 | 610 | 0 | K | ~1300 | TSPCC-0.637-~1300 | |||||
17 | CR | CR4492681 | TSPCC | 0.64 | 1218.50 | 8.590 | 610 | 0 | K | ~1300 | TSPCC-0.637-~1300 | |||||
18 | CR | CR4492692 | TSPCC | 0.64 | 1218.50 | 9.440 | 610 | 0 | K | ~1300 | TSPCC-0.637-~1300 | |||||
19 | CR | CR4493056 | TSPCC | 0.64 | 1218.50 | 5.220 | 610 | 0 | K | ~1300 | TSPCC-0.637-~1300 | |||||
20 | CR | CR4493075 | TSPCC | 0.64 | 1572.00 | 4.010 | 610 | 0 | K | 1300 - 1600 | TSPCC-0.637-1300 - 1600 | |||||
Products |
Cell Formulas | ||
---|---|---|
Range | Formula | |
M5:M20 | M5 | =IF(E5="","",IF(E5<=1300,"~1300",IF(E5<=1600,"1300 - 1600",IF(E5>1600,">1600","Check")))) |
N5:N20 | N5 | =C5&"-"&D5&"-"&M5 |
A5:A20 | A5 | =LEFT(B5,2) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
B1:B4 | Cell Value | duplicates | text | NO |
B1:B4 | Cell Value | duplicates | text | NO |
B1:B4 | Cell Value | duplicates | text | NO |
B1:B4 | Cell Value | duplicates | text | NO |
B1:B4 | Cell Value | duplicates | text | NO |
B1:B149 | Cell Value | duplicates | text | NO |
B1:B149 | Cell Value | duplicates | text | NO |
B1:B149 | Cell Value | duplicates | text | NO |
B4 | Cell Value | duplicates | text | NO |
B4 | Cell Value | duplicates | text | NO |
B4 | Cell Value | duplicates | text | NO |
B4 | Cell Value | duplicates | text | NO |
B. Sales data sample
BookRecon2016_rev2.xlsm | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | |||
3 | No. | Ship to Place Name | Customer | Contract No. | Packaged Coil | Material Product | Coating Weight | Oil Type | Specification | Thickness | Width | inside dia. | outside dia. | QTY | Tanggal Kirim | Width Category | Reference Param | ||
4 | 147 | PT. Baja Sarana Multi | PT BAJA ALAM SUSKES | 4CRX1NS0A0202 | CR3Y91577 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1199 | 9.86 | 45307 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
5 | 148 | PT. Baja Sarana Multi | PT BAJA ALAM SUSKES | 4CRX1NS0A0202 | CR4191720 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1201 | 9.9 | 45307 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
6 | 150 | PT. Baja Sarana Multi | PT BAJA ALAM SUSKES | 4CRX1NS0A0202 | CR3Y90573 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1176 | 8.611 | 45307 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
7 | 152 | PT. Baja Sarana Multi | PT BAJA ALAM SUSKES | 4CRX1NS0A0202 | CR2999579 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 910 | 4.25 | 45307 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
8 | 153 | PT. Baja Sarana Multi | PT BAJA ALAM SUSKES | 4CRX1NS0A0202 | CR3191991 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 881 | 3.77 | 45307 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
9 | 306 | PT. PANDAWA | PT PANDAWA JAYA STEEL | 4CRX1NT0A0B01 | CR3Y90703 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1220 | 9.687 | 45310 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
10 | 308 | PT. PANDAWA | PT PANDAWA JAYA STEEL | 4CRX1NT0A0B01 | CR3Y90714 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1184 | 8.636 | 45310 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
11 | 407 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX1NT0A0H06 | CR3Y91403 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1226 | 5.378 | 45317 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
12 | 417 | PT. PANDAWA | PT PANDAWA JAYA STEEL | 4CRX1NT0A0G01 | CR3Y91465 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1195 | 9.86 | 45317 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
13 | 432 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX1NT0A0H05 | CR3Y90049 | CR | 0 | 3 | TSPCC | 0.631 | 1382 | 610 | 975 | 5.08 | 45318 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
14 | 433 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX1NT0A0H06 | CR3Y90709 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1168 | 6.135 | 45318 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
15 | 449 | PT. PANDAWA | PT PANDAWA JAYA STEEL | 4CRX1NT0A0G01 | CR3Y91051 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1194 | 9.8 | 45318 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
16 | 459 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX1NT0A0H06 | CR3Y90711 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1192 | 8.24 | 45320 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
17 | 479 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX1NT0A0H01 | CR3Y91195 | CR | 0 | 3 | TSPFC400 | 0.588 | 1467 | 610 | 1109 | 7.84 | 45320 | 1300 - 1600 | TSPFC400-0.588-1300 - 1600 | ||
18 | 480 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX1NT0A0H01 | CR3Y91328 | CR | 0 | 3 | TSPFC400 | 0.588 | 1467 | 610 | 1120 | 8.03 | 45320 | 1300 - 1600 | TSPFC400-0.588-1300 - 1600 | ||
19 | 693 | PT. PANDAWA | PT PANDAWA JAYA STEEL | 4CRX2NT0A0502 | CR3Y91481 | CR | 0 | 3 | TSPCC | 0.631 | 1382 | 610 | 1123 | 7.62 | 45342 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
20 | 694 | PT. PANDAWA | PT PANDAWA JAYA STEEL | 4CRX2NT0A0502 | CR4192497 | CR | 0 | 3 | TSPCC | 0.631 | 1382 | 610 | 1119 | 7.7 | 45342 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
21 | 762 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX2NT0A0801 | CR4193002 | CR | 0 | 3 | TSPFC400 | 0.588 | 1467 | 610 | 882 | 3.83 | 45344 | 1300 - 1600 | TSPFC400-0.588-1300 - 1600 | ||
22 | 791 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX2NT0A0702 | CR4193150 | CR | 0 | 3 | TSPFC400 | 0.588 | 1467 | 610 | 879 | 3.67 | 45346 | 1300 - 1600 | TSPFC400-0.588-1300 - 1600 | ||
23 | 989 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX3NT0A0502 | CR3Y91519 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 963 | 5.17 | 45373 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
24 | 990 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX3NT0A0502 | CR3Y91552 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 953 | 5.15 | 45373 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
25 | 991 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX3NT0A0502 | CR4192584 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1195 | 2.84 | 45373 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
26 | 992 | PT Bangun Era Sejahtera Mandiri | PT PERSADA WIJAYA SENTOSA | 4CRX3NT0A0502 | CR4192594 | CR | 0 | 3 | TSPCC | 0.631 | 1489 | 610 | 1182 | 3.759 | 45373 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
27 | 1591 | PT Bangun Era Sejahtera Mandiri | PT BANGUN ERA SEJAHTERA MANDIRI | 4CRX5NT0A0401 | CR4492975 | CR | 0 | 3 | TSPCC | 0.631 | 1382 | 610 | 1044 | 6.32 | 45427 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
28 | 1592 | PT Bangun Era Sejahtera Mandiri | PT BANGUN ERA SEJAHTERA MANDIRI | 4CRX5NT0A0401 | CR4493053 | CR | 0 | 3 | TSPCC | 0.631 | 1382 | 610 | 1050 | 6.28 | 45427 | 1300 - 1600 | TSPCC-0.631-1300 - 1600 | ||
29 | 1600 | PT. BMS (SMM) | PT FERRO NUSA TATA LAKSANA | 4CRX5NT0A0301 | CR4492974 | CR | 0 | 3 | TSPFC400 | 0.588 | 1467 | 610 | 1052 | 6.71 | 45427 | 1300 - 1600 | TSPFC400-0.588-1300 - 1600 | ||
30 | 1601 | PT. BMS (SMM) | PT FERRO NUSA TATA LAKSANA | 4CRX5NT0A0301 | CR4493055 | CR | 0 | 3 | TSPFC400 | 0.588 | 1467 | 610 | 1050 | 6.76 | 45427 | 1300 - 1600 | TSPFC400-0.588-1300 - 1600 | ||
Sheet4 |
C. Reconcile sheet (what I got so far)
Cell Formulas | ||
---|---|---|
Range | Formula | |
A5:A10 | A5 | =IF(B5="","",ROW(B5)-4) |
B5:B10 | B5 | =IFERROR(INDEX(Products!$B$5:$B$500,MATCH(0,COUNTIF($B$4:B4,Products!$B$5:$B$500),0)), "") |
C5:C10 | C5 | =IF(ISBLANK(IF(LEFT(B5,2)="0","",LEFT(B5,2))),"",IF(LEFT(B5,2)="0","",LEFT(B5,2))) |
D5:D10 | D5 | =IFERROR(VLOOKUP($B5,Products!$B:$L,2, 0),"") |
E5:E10 | E5 | =IFERROR(VLOOKUP($B5,Products!$B:$L,3, 0),"") |
F5:F10 | F5 | =IFERROR(VLOOKUP($B5,Products!$B:$L,4, 0),"") |
G5:G10 | G5 | =IF(F5="","",IF(F5<=1300,"~1300",IF(F5<=1600,"1300 - 1600",IF(F5>1600,">1600","Check")))) |
H5:H10 | H5 | =D5&"-"&E5&"-"&G5 |
I5:I10 | I5 | =IFERROR(VLOOKUP($B5,Products!$B:$L,5, 0),"") |
J5:J10 | J5 | =IFERROR(VLOOKUP($B5,Products!$B:$L,6, 0),"") |
K5:K10 | K5 | =IFERROR(VLOOKUP($B5,Products!$B:$L,7, 0),"") |
L5:L10 | L5 | =IFERROR(VLOOKUP($B5,Products!$B:$L,11, 0),"") |
M5:Q10 | M5 | =IFERROR(INDEX(Sales!$C$3:$C$4000,SMALL(IF($H5=Sales!$Q$3:$Q$4000,ROW(Sales!$C$3:$C$4000)-ROW(Sales!$C$3)+1),COLUMN(B2)-1)),"") |
Press CTRL+SHIFT+ENTER to enter array formulas. |
EDIT:
I think I might have caused a bit of confusion on the above question, so to clear up, what I'm struggling to do is have distinct values of the customers returned on column M - Q on reconcile sheet, instead of multiple returned values of the same customers. Secondly, I would like to be able to sort the order of those distinct values from either largest to smallest, or smallest to largest based on the weight of products purchased referring to historical sales data extracted from the Sales sheet.
Last edited by a moderator: