copy specific columns from multiple sheets and insert TOTAL column

MKLAQ

Active Member
Joined
Jan 30, 2021
Messages
387
Office Version
  1. 2016
Platform
  1. Windows
hi
I have many data in multiple sheets and it's increasable and create a new sheets so. what I want macro to create all the data with the headers and borders and formatting with considering there are items are duplicated in the same sheet then should merge and summing the value . standard of the duplicated items .it should match col B,C,D together and when create the whole data if I change the data in any other sheet from COL B : COL E then should clean the data and update the data again .
note: theses simple data but my real data reaches about 5000 rows

first sheet
col.xlsb
ABCDE
1DATEIDBRANDTYPEQTY
201/01/2021CRBM-10CAR-1000BMW29
301/02/2021CRBM-10CAR-1000BMW12
401/03/2021CRBM-12CAR-1000BMW45
501/04/2021CRMR-10CAR-1000MER34
601/05/2021CRMR-12CAR-1000AUDI13
701/06/2021CRMR-11CAR-1001MER15
801/07/2021CRAU-11CAR-1002AUDI14
901/08/2021CRAU-11CAR-1002MER24
1001/09/2021CRAU-12CAR-1002AUDI78
1101/10/2021CRAU-14CAR-1002AUDI15
SS


second sheet
col.xlsb
ABCDE
1DATEIDBRANDTYPEQTY
202/01/2021CRBM-10CAR-1000BMW10
302/03/2021CRBM-12CAR-1000BMW30
402/04/2021CRMR-10CAR-1000MER20
502/05/2021CRMR-12CAR-1000AUDI10
602/06/2021CRMR-11CAR-1001MER5
702/07/2021CRAU-11CAR-1002AUDI5
802/08/2021CRAU-11CAR-1002MER10
902/09/2021CRAU-12CAR-1002AUDI20
1002/10/2021CRAU-14CAR-1002AUDI20
1102/11/2021CRAU-15CAR-1003AUDI21
1202/12/2021CRAU-16CAR-1004AUDI22
1302/11/2021CRAU-15CAR-1003AUDI2
1402/12/2021CRAU-16CAR-1004AUDI3
DD

third sheet
col.xlsb
ABCDE
1DATEIDBRANDTYPEQTY
203/01/2021CRBM-10CAR-1000BMW29
303/03/2021CRBM-12CAR-1000BMW45
403/04/2021CRMR-10CAR-1000MER34
503/05/2021CRMR-12CAR-1000AUDI13
603/06/2021CRMR-11CAR-1001MER15
703/07/2021CRAU-11CAR-1002AUDI14
803/08/2021CRAU-11CAR-1002MER24
903/09/2021CRAU-12CAR-1002AUDI78
1003/10/2021CRAU-14CAR-1002AUDI15
1103/11/2021CRAU-17CAR-1003MER16
SS1



expected result
col.xlsb
ABCDEFGH
1ITEMIDBRANDTYPEQTY1QTY2QTY3TOTAL
21CRBM-10CAR-1000BMW41102980
32CRBM-12CAR-1000BMW453045120
43CRMR-10CAR-1000MER34203488
54CRMR-12CAR-1000AUDI13101336
65CRMR-11CAR-1001MER1551535
76CRAU-11CAR-1002AUDI1451433
87CRAU-11CAR-1002MER24102458
98CRAU-12CAR-1002AUDI782078176
109CRAU-14CAR-1002AUDI15201550
1110CRAU-15CAR-1003AUDI-23--
1211CRAU-16CAR-1004AUDI-25--
1312CRAU-17CAR-1003MER--1616
COLLECTION
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,214,788
Messages
6,121,575
Members
449,039
Latest member
Arbind kumar

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