Macro to split worksheet by date

Chunky_22

Board Regular
Joined
May 19, 2004
Messages
149
Hi All

I have a fairly large sheet sorted by date. The earliest date is 01/04/2010 (01 April). The dates appear in column G. Rows 1 - 5 are header rows, so the first line of data is row 6.

I need to create multiple workbooks, one for each month that have the 5 header rows at the top, and then all the data for that month. I also need the file to be saved automatically to a location on my computer, including the Month and year in the file name.

My current data range (under the header rows is A6:AF8102 but this could change for future files.

Could someone assist with this please? It would be a great help.

Thanks in advance
 
Even though the new workbook is visible, the macro code still filters and copies from the original worksheet. So that shouldn't be the problem.

The macro does work on my test data.
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Thanks for all your help with this so far. There must be something in my data that is preventing it from working. I will endeavour to find the issue.

Much appreciated
 
Upvote 0

Forum statistics

Threads
1,224,578
Messages
6,179,654
Members
452,934
Latest member
mm1t1

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