VBA- Copy data and save as new workbook with date as savename from copied dataset

learn86

New Member
Joined
Sep 9, 2018
Messages
2
Hi there,

I am very new to excel VBA and was struggling to do the following through codes:
1) Autosort by date.
2) Copy dataset by date and paste it in a new workbook.
3) Remove date column from new data.
4) Save the new workbook with date as naming convention for saving.

I am giving the the screenshot links below to visualize this better:

1. The dataset sorted by date
https://imgur.com/a/cCBPuoz

2. Filter by date and copy or copy until next date change
https://imgur.com/a/QsiEyLI

3. Open new workbook, paste and remove date column
https://imgur.com/a/klG3zow

4. Save the workbook by date name (repeat entire process until last date in the dataset)
https://imgur.com/a/qztRxew


Please help.

I do hope I have been able to articulate what I intend to do.

Thanks in advance.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
a way to learn is to start the macro recorder, bottom left of screen, perform the action you want to occur one step at a time, stop the recorder, and look at the code
 
Upvote 0
Hi,

Thanks! I have tried that however, getting stuck (as in no clue on what to do next) when I want the macro to automatically select data until next change in date as well as naming the file according to the date for which the data has been copied into.

a way to learn is to start the macro recorder, bottom left of screen, perform the action you want to occur one step at a time, stop the recorder, and look at the code
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

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