VBA code for Copy and Paste to new Workbook sorted with Date

Tarek_CTG

Board Regular
Joined
Apr 27, 2015
Messages
154
Hello All,

I have a workbook. There are some sheets named "A", "B", "C" etc. Sheets can be added later to this workbook. All sheets has same column name and number, starting from Column A named "SL No" and ends in Column O named "Remarks" . There is a date in Column I named "Received Date". So I want to copy all the data from all the sheets to a new worksheet named "Master Data" of a new workbook.
Now the conditions are:

01. All the data from all the worksheets should be in new worksheet in new workbook.
02. In new worksheets, data will be sorted according to oldest date to newest date (that is in Column I named "Received Date"). So, column I need to be filtered according to oldest date to newest date.
03. In Column H, M, N there are some numbers. I need the individual sum of Column H, M, N in new worksheets after the last low of data.
04. All the sheets has Serial No in Column A and serial no starts from 01 in all the sheets. So, I need another code which will execute new data in new worksheets from serial no 1 to rest.

Now, I will get new worksheet in new workbook. Here there will be a column named "Remarks" in new worksheets. In remarks, there are some cells named like "Joined", "Held Up", "Under Process" etc. Now, I want to copy data from this new worksheet like this:

01. All the data having remarks "Joined", will copy and paste to new worksheets named "Joined" in same new workbooks after "Master Data".
02. Similarly All the data having remarks "Held Up", will copy and paste to new worksheets named "Held Up" in same new workbooks after "Joined".
03. All the data having remarks "Under Process", will copy and paste to new worksheets named "Under Process" in same new workbooks after "Held Up".
04. Now rest all of the data, will copy and paste to new worksheets named "Rest" in same new workbooks after "Under Process".
05. Here for these new worksheets, I need similar things that is done previously, which is that, individual sum of Column H, M, N in these new worksheets after the last low of data.

Thanks in Advance. I eagerly need some one help.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,147,499
Messages
5,741,507
Members
423,663
Latest member
kaveh87rsh

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
Top