combining duplicates

Novman

New Member
Joined
Feb 19, 2023
Messages
20
Office Version
  1. 365
Platform
  1. Windows
Combining Dupalitcks.xlsm
ABCDEFGHIJKLMNOPQR
2sizeColourPOPackmmcodeAmountColourPOPackmmcodeAmount
3hyellow12458yesabc10h5147642
4hblue12541no2f95441111
5hblue12541no5
6fyellow green12455yes4ColourPOPackmmcodeAmount
7fblack45551yesabc87h5147642
8fyellow12490yesabc6f95441111
9hblack1478no5yellow4989642
10hyellow12458yesabc20blue250827
11fyellow green12455yes8yellow green2491012
12fyellow12490yesabc6black4702992
13
14What I am looking to do is combined my duplicates by looking through
153 columns hi-lighted above and adding them together if all 3 criteria's match
16and adding the values in last column combining occurs
17
18This is what I would like it to loo like, the shading is only for demonstration.
19sizeColourPOPackmmcodeAmount
20hyellow12458yesabc30
21hblue12541no7
22fyellow green12455yes12
23fblack45551yesabc87
24fyellow12490yesabc6
25hblack1478no5
26fyellow12490yesabc6
27
Sheet2
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi

=LET(X,UNIQUE(B2:G11,FALSE),HSTACK(X,BYROW(X,LAMBDA(W,SUM(FILTER(H2:H11,(INDEX(W,1,1)=B2:B11)*(INDEX(W,1,2)=C2:C11)*(INDEX(W,1,3)=D2:D11)))))))
 
Upvote 0
Hi

=LET(X,UNIQUE(B2:G11,FALSE),HSTACK(X,BYROW(X,LAMBDA(W,SUM(FILTER(H2:H11,(INDEX(W,1,1)=B2:B11)*(INDEX(W,1,2)=C2:C11)*(INDEX(W,1,3)=D2:D11)))))))
Hi, Thank you for your reply, Done a quick check to try out your formula and it gives back what I'm looking for, before I go ahead and try it on my bigger sheet I just want to ask, iv used (Data) Filter then (Data Tools) then Consolidate, can I get same results using that method or is it best to use the formula.
 
Upvote 0
Sorry for the wait, the fourmla you gave me does work on the table i sent, my mistake as i thought all i had to do wes eidit the fourmla but been trying but cant get it, ill past a new table if you could eidet your fourmla to give me the same results as the one ou first posted.
 
Upvote 0
MrExccel Help.xlsm
ABCDEFGHIJKLMNOPQRST
2sizeColourPOPackmmcodeAmountsizeColourPOPackmmcode0
3hyellow12458yesabc10hyellow12458yes0abc30
4hblue12541no2hblue12541no007
5hblue12541no5fyellow green12455yes0012
6fyellow green12455yes4fblack45551yes0abc87
7fblack45551yesabc87fyellow12490yes0abc12
8fyellow12490yesabc6hblack1478no005
9hblack1478no5
10hyellow12458yesabc20
11fyellow green12455yes8
12fyellow12490yesabc6
13
14use tabe below to return the table above with blue tick
15OrderIn StockH/FColourPOPackValueday 1day 2day 3day 4day 5day 6day 7stockneeded for orderoreder sentFinal Count
16
171YEShyellow12458no100134672932
182NOhblue12541yes9042568454294
193NOhblue12541no5020000002
204NOfyellow green12455no705248672979
215YESfblack45551yes2289112984542269
226YESfyellow12490yes37326000011
237YEShblack1478yes1222400008
248YEShyellow12458no171255111162
259NOfyellow green12455yes845378134100234
2610NOfyellow12490yes1028515425615152
2711YESfyellow12490yes5522102005571
2812YES9672155452565164
291178
Sheet2
Cell Formulas
RangeFormula
J2:P8J2=LET(X,UNIQUE(B2:G12,FALSE),HSTACK(X,BYROW(X,LAMBDA(W,SUM(FILTER(H2:H12,(INDEX(W,1,1)=B2:B12)*(INDEX(W,1,2)=C2:C12)*(INDEX(W,1,3)=D2:D12)))))))
S17:S28S17=SUM(I17:O17)
S29S29=SUM(S17:S28)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
_FilterDatabase=Sheet2!$B$2:$H$12J2
 
Upvote 0
MrExccel Help.xlsm
BCDEFGHIJKLMNOPQRST
2sizeColourPOPackmmcodeAmountTable on the right is the result of the combine table from the left using a formulasizeColourPOPackmmcode0
3hyellow12458yesABC10hyellow12458yes0ABC30
4hblue12541no2hblue12541no007
5hblue12541no5fgreen12455yes0012
6fgreen12455yes4fblack45551yes0ABC87
7fblack45551yesABC87fyellow12490yes0ABC12
8fyellow12490yesABC6hblack1478no005
9hblack1478no5
10hyellow12458yesABC20"=LET(X,UNIQUE(B2:G12,FALSE),HSTACK(X,BYROW(X,LAMBDA(W,SUM(FILTER(H2:H12,(INDEX(W,1,1)=B2:B12)*(INDEX(W,1,2)=C2:C12)*(INDEX(W,1,3)=D2:D12)))))))
11fgreen12455yes8
12fyellow12490yesABC6
13
14
15I'm looking for a formula to combined the debitages in table below and add its counts, what I would like it to return is below this table
16OrderIn StockH/FColourPOPackValueday 1day 2day 3day 4day 5day 6day 7stockneeded for orderorder sentFinal Count
17
181YEShyellow12458no100134672912
192NOhblue12541yes9042568454210
203NOhblue12541no50200000055
214NOfgreen12455no705248672912
225YESfblack45551yes228911298454278
236YESfyellow12490yes3732600008
247YEShblack1478yes12224000052
258YEShyellow12458no171255111130
269NOfgreen12455yes845378134100241
2710NOfyellow12490yes1028515425615115
2811YESfyellow12490yes5522102005555
2912YES967215545256511
30the green shaded columns are the columns id like returned and combined if they are duplicates, wile adding the blue shaded columns figures when combining
31the table at top of page has a formula doing as I need it to but is a smaller table with less columns 679
32H/FColourPOFinal Count
33
34hyellow1245842this is what I want to have returned if posable
35hblue1254165
36fgreen12455253
37fblack4555178
38fyellow12490178
39hblack147852
Sheet2
Cell Formulas
RangeFormula
M2:S8M2=LET(X,UNIQUE(B2:G12,FALSE),HSTACK(X,BYROW(X,LAMBDA(W,SUM(FILTER(H2:H12,(INDEX(W,1,1)=B2:B12)*(INDEX(W,1,2)=C2:C12)*(INDEX(W,1,3)=D2:D12)))))))
S31S31=SUM(S18:S29)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
_FilterDatabase=Sheet2!$B$2:$H$12M2
 
Upvote 0
MrExccel Help.xlsm
BCDEFGHIJKLMNOPQRST
2sizeColourPOPackmmcodeAmountTable on the right is the result of the combine table from the left using a formulasizeColourPOPackmmcode0
3hyellow12458yesABC10hyellow12458yes0ABC30
4hblue12541no2hblue12541no007
5hblue12541no5fgreen12455yes0012
6fgreen12455yes4fblack45551yes0ABC87
7fblack45551yesABC87fyellow12490yes0ABC12
8fyellow12490yesABC6hblack1478no005
9hblack1478no5
10hyellow12458yesABC20"=LET(X,UNIQUE(B2:G12,FALSE),HSTACK(X,BYROW(X,LAMBDA(W,SUM(FILTER(H2:H12,(INDEX(W,1,1)=B2:B12)*(INDEX(W,1,2)=C2:C12)*(INDEX(W,1,3)=D2:D12)))))))
11fgreen12455yes8
12fyellow12490yesABC6
13
14
15I'm looking for a formula to combined the debitages in table below and add its counts, what I would like it to return is below this table
16OrderIn StockH/FColourPOPackValueday 1day 2day 3day 4day 5day 6day 7stockneeded for orderorder sentFinal Count
17
181YEShyellow12458no100134672912
192NOhblue12541yes9042568454210
203NOhblue12541no50200000055
214NOfgreen12455no705248672912
225YESfblack45551yes228911298454278
236YESfyellow12490yes3732600008
247YEShblack1478yes12224000052
258YEShyellow12458no171255111130
269NOfgreen12455yes845378134100241
2710NOfyellow12490yes1028515425615115
2811YESfyellow12490yes5522102005555
2912YES967215545256511
30the green shaded columns are the columns id like returned and combined if they are duplicates, wile adding the blue shaded columns figures when combining
31the table at top of page has a formula doing as I need it to but is a smaller table with less columns 679
32H/FColourPOFinal Count
33
34hyellow1245842this is what I want to have returned if posable
35hblue1254165
36fgreen12455253
37fblack4555178
38fyellow12490178
39hblack147852
Sheet2
Cell Formulas
RangeFormula
M2:S8M2=LET(X,UNIQUE(B2:G12,FALSE),HSTACK(X,BYROW(X,LAMBDA(W,SUM(FILTER(H2:H12,(INDEX(W,1,1)=B2:B12)*(INDEX(W,1,2)=C2:C12)*(INDEX(W,1,3)=D2:D12)))))))
S31S31=SUM(S18:S29)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
_FilterDatabase=Sheet2!$B$2:$H$12M2
I hope this will help a bit more
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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