abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,494
- Office Version
- 2019
- 2010
- Platform
- Windows
hello
I have many files in the same folde contain one sheet and contain duplicates data . so I search to get macro like my request but I don't find any thing so far . so what I want merging and summing duplicates items based on column B and summing the quantity for columns F,H
file 1
file2
file 3
some results should be in file OUPUT with create names BUYING1,2,3
I have many files in the same folde contain one sheet and contain duplicates data . so I search to get macro like my request but I don't find any thing so far . so what I want merging and summing duplicates items based on column B and summing the quantity for columns F,H
file 1
1.xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | DATE | CODE | COMMEDITY | PRODUCTION BY | REF | QTY | PRICE | TOTAL | ||
2 | 5/5/2018 | cd-mn-1 | cloth-mn1 | IT | TT-SR1 | 120.00 | $20.00 | $2,400.00 | ||
3 | 5/6/2018 | cd-mn-2 | cloth-mn2 | IT | TT-SR2 | 1,222.00 | $25.00 | $30,550.00 | ||
4 | 5/7/2018 | cd-mn-3 | cloth-mn3 | IT | TT-SR3 | 150.00 | $23.00 | $3,450.00 | ||
5 | 5/8/2018 | cd-mn-4 | cloth-mn4 | IT | TT-SR4 | 50.00 | $25.00 | $1,250.00 | ||
6 | 5/9/2018 | cd-mn-5 | cloth-mn5 | IT | TT-SR5 | 250.00 | $30.00 | $7,500.00 | ||
7 | 5/10/2018 | cd-mn-6 | cloth-mn6 | CHI | TT-SR6 | 300.00 | $20.00 | $6,000.00 | ||
8 | 5/11/2018 | cd-mn-7 | cloth-mn7 | CHI | TT-SR7 | 200.00 | $40.00 | $8,000.00 | ||
9 | 5/12/2018 | cd-mn-8 | cloth-mn8 | CHI | TT-SR8 | 150.00 | $22.00 | $3,300.00 | ||
10 | 5/13/2018 | cd-mn-9 | cloth-mn9 | CHI | TT-SR9 | 60.00 | $50.00 | $3,000.00 | ||
11 | 5/14/2018 | cd-mn-10 | cloth-mn10 | CHI | TT-SR10 | 20.00 | $60.00 | $1,200.00 | ||
12 | 5/15/2018 | cd-mn-11 | cloth-mn1 | IT | TT-SR1 | 120.00 | $44.00 | $5,280.00 | ||
13 | 5/16/2018 | cd-mn-1 | cloth-mn2 | IT | TT-SR2 | 100.00 | $20.00 | $2,000.00 | ||
14 | 5/17/2018 | cd-mn-2 | cloth-mn3 | IT | TT-SR3 | 50.00 | $25.00 | $1,250.00 | ||
15 | 5/18/2018 | cd-mn-3 | cloth-mn4 | IT | TT-SR4 | 200.00 | $23.00 | $4,600.00 | ||
16 | 5/19/2018 | cd-mn-4 | cloth-mn5 | IT | TT-SR5 | 20.00 | $25.00 | $500.00 | ||
17 | 5/20/2018 | cd-mn-5 | cloth-mn6 | CHI | TT-SR6 | 100.00 | $30.00 | $3,000.00 | ||
18 | 5/21/2018 | cd-mn-6 | cloth-mn7 | CHI | TT-SR7 | 100.00 | $20.00 | $2,000.00 | ||
19 | 5/22/2018 | cd-mn-7 | cloth-mn8 | CHI | TT-SR8 | 50.00 | $40.00 | $2,000.00 | ||
20 | 5/23/2018 | cd-mn-8 | cloth-mn9 | CHI | TT-SR9 | 50.00 | $22.00 | $1,100.00 | ||
21 | 5/24/2018 | cd-mn-9 | cloth-mn10 | CHI | TT-SR10 | 50.00 | $50.00 | $2,500.00 | ||
BUYING |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H21 | H2 | =F2*G2 |
file2
2.xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | DATE | CODE | COMMEDITY | PRODUCTION BY | REF | QTY | PRICE | TOTAL | ||
2 | 6/5/2018 | cd-wm-1 | cloth-wm1 | FR | WL-SR1 | 50.00 | $30.00 | $1,500.00 | ||
3 | 6/6/2018 | cd-wm-2 | cloth-wm2 | FR | WL-SR2 | 200.00 | $40.00 | $8,000.00 | ||
4 | 6/7/2018 | cd-wm-3 | cloth-wm3 | FR | WL-SR3 | 20.00 | $35.00 | $700.00 | ||
5 | 6/8/2018 | cd-wm-4 | cloth-wm4 | FR | WL-SR4 | 30.00 | $55.00 | $1,650.00 | ||
6 | 6/9/2018 | cd-wm-5 | cloth-wm5 | FR | WL-SR5 | 500.00 | $44.00 | $22,000.00 | ||
7 | 6/10/2018 | cd-wm-6 | cloth-wm6 | TR | WL-SR6 | 250.00 | $42.00 | $10,500.00 | ||
8 | 6/11/2018 | cd-wm-7 | cloth-wm7 | TR | WL-SR7 | 600.00 | $42.00 | $25,200.00 | ||
9 | 6/12/2018 | cd-wm-8 | cloth-wm8 | TR | WL-SR8 | 150.00 | $45.00 | $6,750.00 | ||
10 | 6/13/2018 | cd-wm-9 | cloth-wm9 | TR | WL-SR9 | 100.00 | $50.00 | $5,000.00 | ||
11 | 6/14/2018 | cd-wm-10 | cloth-wm10 | FR | WL-SR10 | 20.00 | $60.00 | $1,200.00 | ||
12 | 6/15/2018 | cd-wm-11 | cloth-wm11 | FR | WL-SR11 | 30.00 | $44.00 | $1,320.00 | ||
13 | 6/16/2018 | cd-wm-1 | cloth-wm1 | FR | WL-SR1 | 150.00 | $20.00 | $3,000.00 | ||
14 | 6/17/2018 | cd-wm-2 | cloth-wm2 | FR | WL-SR2 | 400.00 | $25.00 | $10,000.00 | ||
15 | 6/18/2018 | cd-wm-3 | cloth-wm3 | FR | WL-SR3 | 240.00 | $23.00 | $5,520.00 | ||
16 | 6/19/2018 | cd-wm-4 | cloth-wm4 | FR | WL-SR4 | 20.00 | $25.00 | $500.00 | ||
17 | 6/20/2018 | cd-wm-5 | cloth-wm5 | FR | WL-SR5 | 100.00 | $100.00 | $10,000.00 | ||
18 | 6/21/2018 | cd-wm-6 | cloth-wm6 | TR | WL-SR6 | 100.00 | $20.00 | $2,000.00 | ||
19 | 6/22/2018 | cd-wm-7 | cloth-wm7 | TR | WL-SR7 | 50.00 | $99.00 | $4,950.00 | ||
20 | 6/23/2018 | cd-wm-8 | cloth-wm8 | TR | WL-SR8 | 50.00 | $88.00 | $4,400.00 | ||
21 | 6/24/2018 | cd-wm-9 | cloth-wm9 | TR | WL-SR9 | 50.00 | $50.00 | $2,500.00 | ||
BUYING |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H21 | H2 | =F2*G2 |
file 3
3.xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | DATE | CODE | COMMEDITY | PRODUCTION BY | REF | QTY | PRICE | TOTAL | ||
2 | 7/5/2018 | cd-KD-1 | cloth-KD1 | TR | KL-SR1 | 20.00 | $33.00 | $660.00 | ||
3 | 7/6/2018 | cd-KD-2 | cloth-KD2 | TR | KL-SR2 | 50.00 | $22.00 | $1,100.00 | ||
4 | 7/7/2018 | cd-KD-3 | cloth-KD3 | TR | KL-SR3 | 40.00 | $45.00 | $1,800.00 | ||
5 | 7/8/2018 | cd-KD-4 | cloth-KD4 | TR | KL-SR4 | 100.00 | $44.00 | $4,400.00 | ||
6 | 7/9/2018 | cd-KD-5 | cloth-KD5 | TR | KL-SR5 | 120.00 | $25.00 | $3,000.00 | ||
7 | 7/10/2018 | cd-KD-6 | cloth-KD6 | TR | KL-SR6 | 130.00 | $33.00 | $4,290.00 | ||
8 | 7/11/2018 | cd-KD-7 | cloth-KD7 | CHI | KL-SR7 | 160.00 | $66.00 | $10,560.00 | ||
9 | 7/12/2018 | cd-KD-8 | cloth-KD8 | CHI | KL-SR8 | 80.00 | $99.00 | $7,920.00 | ||
10 | 7/13/2018 | cd-KD-9 | cloth-KD9 | CHI | KL-SR9 | 90.00 | $88.00 | $7,920.00 | ||
11 | 7/14/2018 | cd-KD-10 | cloth-KD10 | CHI | KL-SR10 | 100.00 | $77.00 | $7,700.00 | ||
12 | 7/15/2018 | cd-KD-11 | cloth-KD11 | CHI | KL-SR11 | 50.00 | $32.00 | $1,600.00 | ||
13 | 7/16/2018 | cd-KD-1 | cloth-KD1 | TR | KL-SR1 | 20.00 | $20.00 | $400.00 | ||
14 | 7/17/2018 | cd-KD-2 | cloth-KD2 | TR | KL-SR2 | 250.00 | $25.00 | $6,250.00 | ||
15 | 7/18/2018 | cd-KD-3 | cloth-KD3 | TR | KL-SR3 | 280.00 | $23.00 | $6,440.00 | ||
16 | 7/19/2018 | cd-KD-4 | cloth-KD4 | TR | KL-SR4 | 20.00 | $25.00 | $500.00 | ||
17 | 7/20/2018 | cd-KD-5 | cloth-KD5 | TR | KL-SR5 | 100.00 | $100.00 | $10,000.00 | ||
18 | 7/21/2018 | cd-KD-6 | cloth-KD6 | TR | KL-SR6 | 100.00 | $20.00 | $2,000.00 | ||
19 | 7/22/2018 | cd-KD-7 | cloth-KD7 | CHI | KL-SR7 | 50.00 | $99.00 | $4,950.00 | ||
20 | 7/23/2018 | cd-KD-8 | cloth-KD8 | CHI | KL-SR8 | 50.00 | $88.00 | $4,400.00 | ||
21 | 7/24/2018 | cd-KD-9 | cloth-KD9 | CHI | KL-SR9 | 50.00 | $50.00 | $2,500.00 | ||
BUYING |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H21 | H2 | =F2*G2 |
some results should be in file OUPUT with create names BUYING1,2,3
OUTPUT (2).xlsm | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | ITEM | CODE | COMMEDITY | PRODUCTION BY | REF | QTY | TOTAL | ||
2 | 1 | cd-mn-1 | cloth-mn1 | IT | TT-SR1 | 220.00 | $4,400.00 | ||
3 | 2 | cd-mn-2 | cloth-mn2 | IT | TT-SR2 | 1,272.00 | $31,800.00 | ||
4 | 3 | cd-mn-3 | cloth-mn3 | IT | TT-SR3 | 350.00 | $8,050.00 | ||
5 | 4 | cd-mn-4 | cloth-mn4 | IT | TT-SR4 | 70.00 | $1,750.00 | ||
BUYING1 |
OUTPUT (2).xlsm | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | ITEM | CODE | COMMEDITY | PRODUCTION BY | REF | QTY | TOTAL | ||
2 | 1 | cd-wm-1 | cloth-wm1 | FR | WL-SR1 | 200.00 | $4,500.00 | ||
3 | 2 | cd-wm-2 | cloth-wm2 | FR | WL-SR2 | 600.00 | $18,000.00 | ||
4 | 3 | cd-wm-3 | cloth-wm3 | FR | WL-SR3 | 260.00 | $6,220.00 | ||
5 | 4 | cd-wm-4 | cloth-wm4 | FR | WL-SR4 | 50.00 | $2,150.00 | ||
6 | |||||||||
BUYING2 |
OUTPUT (2).xlsm | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | ITEM | CODE | COMMEDITY | PRODUCTION BY | REF | QTY | TOTAL | ||
2 | 1 | cd-KD-1 | cloth-KD1 | TR | KL-SR1 | 40.00 | $1,060.00 | ||
3 | 2 | cd-KD-2 | cloth-KD2 | TR | KL-SR2 | 300.00 | $7,350.00 | ||
4 | 3 | cd-KD-3 | cloth-KD3 | TR | KL-SR3 | 320.00 | $8,240.00 | ||
5 | 4 | cd-KD-4 | cloth-KD4 | TR | KL-SR4 | 120.00 | $4,900.00 | ||
6 | |||||||||
BUYING3 |