Start of Week Replication

Wizerd

New Member
Joined
Aug 11, 2017
Messages
27
I have a book that has 6 template sheets (Sheet1-Sheet6). I am looking to have a message box input the 'Start Date', then 'How Many Days'. With this info I need to replicate the templates with the dates (ie: 03-28-Sheet1, 03-28-Sheet2...ect...ect), from the starting date, looping for second input number. Any help would be greatly appreciated.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
So if a person input 3 for the days count you'd want to end up with 18 new sheets in the same new workbook?
I think a userform with 2 controls (one for each data value) would be better than 2 input prompts. Message boxes don't accept inputs.
 
Upvote 0
So if a person input 3 for the days count you'd want to end up with 18 new sheets in the same new workbook?
I think a userform with 2 controls (one for each data value) would be better than 2 input prompts. Message boxes don't accept inputs.
That is correct: for 3 days, it would make 18 sheets, each with the date as the prefix.
 
Upvote 0
I have no code for this but have been researching. It seems you can't copy from wb to wb and rename at the same time (if you can, I've not found code for that). So the process might have to be
- copy all 6 sheets to a new wb as Sheet1, Sheet2, etc.
- activate the new wb and rename all as 03-28- & Sheet.Name
- repeat copying in a counting loop (i) but as 03-28- & Left(Sheet.Name,5) & i

You should be able to find plenty of example codes for copying sheets to a new wb as as start.
 
Upvote 0

Forum statistics

Threads
1,215,035
Messages
6,122,785
Members
449,095
Latest member
m_smith_solihull

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