collection data for one sheet across multiple files in the same folder

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,507
Office Version
  1. 2019
  2. 2010
Platform
  1. 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
1.xlsx
ABCDEFGH
1DATECODECOMMEDITYPRODUCTION BYREFQTYPRICETOTAL
25/5/2018cd-mn-1cloth-mn1ITTT-SR1120.00$20.00$2,400.00
35/6/2018cd-mn-2cloth-mn2ITTT-SR21,222.00$25.00$30,550.00
45/7/2018cd-mn-3cloth-mn3ITTT-SR3150.00$23.00$3,450.00
55/8/2018cd-mn-4cloth-mn4ITTT-SR450.00$25.00$1,250.00
65/9/2018cd-mn-5cloth-mn5ITTT-SR5250.00$30.00$7,500.00
75/10/2018cd-mn-6cloth-mn6CHITT-SR6300.00$20.00$6,000.00
85/11/2018cd-mn-7cloth-mn7CHITT-SR7200.00$40.00$8,000.00
95/12/2018cd-mn-8cloth-mn8CHITT-SR8150.00$22.00$3,300.00
105/13/2018cd-mn-9cloth-mn9CHITT-SR960.00$50.00$3,000.00
115/14/2018cd-mn-10cloth-mn10CHITT-SR1020.00$60.00$1,200.00
125/15/2018cd-mn-11cloth-mn1ITTT-SR1120.00$44.00$5,280.00
135/16/2018cd-mn-1cloth-mn2ITTT-SR2100.00$20.00$2,000.00
145/17/2018cd-mn-2cloth-mn3ITTT-SR350.00$25.00$1,250.00
155/18/2018cd-mn-3cloth-mn4ITTT-SR4200.00$23.00$4,600.00
165/19/2018cd-mn-4cloth-mn5ITTT-SR520.00$25.00$500.00
175/20/2018cd-mn-5cloth-mn6CHITT-SR6100.00$30.00$3,000.00
185/21/2018cd-mn-6cloth-mn7CHITT-SR7100.00$20.00$2,000.00
195/22/2018cd-mn-7cloth-mn8CHITT-SR850.00$40.00$2,000.00
205/23/2018cd-mn-8cloth-mn9CHITT-SR950.00$22.00$1,100.00
215/24/2018cd-mn-9cloth-mn10CHITT-SR1050.00$50.00$2,500.00
BUYING
Cell Formulas
RangeFormula
H2:H21H2=F2*G2



file2
2.xlsx
ABCDEFGH
1DATECODECOMMEDITYPRODUCTION BYREFQTYPRICETOTAL
26/5/2018cd-wm-1cloth-wm1FRWL-SR150.00$30.00$1,500.00
36/6/2018cd-wm-2cloth-wm2FRWL-SR2200.00$40.00$8,000.00
46/7/2018cd-wm-3cloth-wm3FRWL-SR320.00$35.00$700.00
56/8/2018cd-wm-4cloth-wm4FRWL-SR430.00$55.00$1,650.00
66/9/2018cd-wm-5cloth-wm5FRWL-SR5500.00$44.00$22,000.00
76/10/2018cd-wm-6cloth-wm6TRWL-SR6250.00$42.00$10,500.00
86/11/2018cd-wm-7cloth-wm7TRWL-SR7600.00$42.00$25,200.00
96/12/2018cd-wm-8cloth-wm8TRWL-SR8150.00$45.00$6,750.00
106/13/2018cd-wm-9cloth-wm9TRWL-SR9100.00$50.00$5,000.00
116/14/2018cd-wm-10cloth-wm10FRWL-SR1020.00$60.00$1,200.00
126/15/2018cd-wm-11cloth-wm11FRWL-SR1130.00$44.00$1,320.00
136/16/2018cd-wm-1cloth-wm1FRWL-SR1150.00$20.00$3,000.00
146/17/2018cd-wm-2cloth-wm2FRWL-SR2400.00$25.00$10,000.00
156/18/2018cd-wm-3cloth-wm3FRWL-SR3240.00$23.00$5,520.00
166/19/2018cd-wm-4cloth-wm4FRWL-SR420.00$25.00$500.00
176/20/2018cd-wm-5cloth-wm5FRWL-SR5100.00$100.00$10,000.00
186/21/2018cd-wm-6cloth-wm6TRWL-SR6100.00$20.00$2,000.00
196/22/2018cd-wm-7cloth-wm7TRWL-SR750.00$99.00$4,950.00
206/23/2018cd-wm-8cloth-wm8TRWL-SR850.00$88.00$4,400.00
216/24/2018cd-wm-9cloth-wm9TRWL-SR950.00$50.00$2,500.00
BUYING
Cell Formulas
RangeFormula
H2:H21H2=F2*G2



file 3
3.xlsx
ABCDEFGH
1DATECODECOMMEDITYPRODUCTION BYREFQTYPRICETOTAL
27/5/2018cd-KD-1cloth-KD1TRKL-SR120.00$33.00$660.00
37/6/2018cd-KD-2cloth-KD2TRKL-SR250.00$22.00$1,100.00
47/7/2018cd-KD-3cloth-KD3TRKL-SR340.00$45.00$1,800.00
57/8/2018cd-KD-4cloth-KD4TRKL-SR4100.00$44.00$4,400.00
67/9/2018cd-KD-5cloth-KD5TRKL-SR5120.00$25.00$3,000.00
77/10/2018cd-KD-6cloth-KD6TRKL-SR6130.00$33.00$4,290.00
87/11/2018cd-KD-7cloth-KD7CHIKL-SR7160.00$66.00$10,560.00
97/12/2018cd-KD-8cloth-KD8CHIKL-SR880.00$99.00$7,920.00
107/13/2018cd-KD-9cloth-KD9CHIKL-SR990.00$88.00$7,920.00
117/14/2018cd-KD-10cloth-KD10CHIKL-SR10100.00$77.00$7,700.00
127/15/2018cd-KD-11cloth-KD11CHIKL-SR1150.00$32.00$1,600.00
137/16/2018cd-KD-1cloth-KD1TRKL-SR120.00$20.00$400.00
147/17/2018cd-KD-2cloth-KD2TRKL-SR2250.00$25.00$6,250.00
157/18/2018cd-KD-3cloth-KD3TRKL-SR3280.00$23.00$6,440.00
167/19/2018cd-KD-4cloth-KD4TRKL-SR420.00$25.00$500.00
177/20/2018cd-KD-5cloth-KD5TRKL-SR5100.00$100.00$10,000.00
187/21/2018cd-KD-6cloth-KD6TRKL-SR6100.00$20.00$2,000.00
197/22/2018cd-KD-7cloth-KD7CHIKL-SR750.00$99.00$4,950.00
207/23/2018cd-KD-8cloth-KD8CHIKL-SR850.00$88.00$4,400.00
217/24/2018cd-KD-9cloth-KD9CHIKL-SR950.00$50.00$2,500.00
BUYING
Cell Formulas
RangeFormula
H2:H21H2=F2*G2


some results should be in file OUPUT with create names BUYING1,2,3
OUTPUT (2).xlsm
ABCDEFG
1ITEMCODECOMMEDITYPRODUCTION BYREFQTYTOTAL
21cd-mn-1cloth-mn1ITTT-SR1220.00$4,400.00
32cd-mn-2cloth-mn2ITTT-SR21,272.00$31,800.00
43cd-mn-3cloth-mn3ITTT-SR3350.00$8,050.00
54cd-mn-4cloth-mn4ITTT-SR470.00$1,750.00
BUYING1



OUTPUT (2).xlsm
ABCDEFG
1ITEMCODECOMMEDITYPRODUCTION BYREFQTYTOTAL
21cd-wm-1cloth-wm1FRWL-SR1200.00$4,500.00
32cd-wm-2cloth-wm2FRWL-SR2600.00$18,000.00
43cd-wm-3cloth-wm3FRWL-SR3260.00$6,220.00
54cd-wm-4cloth-wm4FRWL-SR450.00$2,150.00
6
BUYING2



OUTPUT (2).xlsm
ABCDEFG
1ITEMCODECOMMEDITYPRODUCTION BYREFQTYTOTAL
21cd-KD-1cloth-KD1TRKL-SR140.00$1,060.00
32cd-KD-2cloth-KD2TRKL-SR2300.00$7,350.00
43cd-KD-3cloth-KD3TRKL-SR3320.00$8,240.00
54cd-KD-4cloth-KD4TRKL-SR4120.00$4,900.00
6
BUYING3
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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