Solved

Copy an existing worksheet and create the same worksheet worksheet for each day of the year

Posted on 2011-03-13
3
224 Views
Last Modified: 2012-05-11
Hi,

I have a worksheet prepared in Excel for the Cashiers that needs to be prepared on daily basis. I am interested to copy that worksheet and have it prepared for each day of the year in the same workbook. But it will be time consuming if I do it manually.

I know that with macros I should be able to do that, but I don’t have any idea how to prepare it.
It would be perfect if the sheets are named as dates, for example: 3/1/2011, 3/2/2011, 3/3/2011 or it could be March 1 2011, March 2 2011.

Please let me know if you have any questions.

Thanks and Regards,

Michael
0
Comment
Question by:mmoralespr
  • 2
3 Comments
 
LVL 8

Expert Comment

by:wchh
ID: 35124427
try Macro Below
Sub Macro1()

Dim datefr As Date
Dim cnt As Integer

datefr = Now()
For cnt = 1 To 10
    datefr = datefr + 1
    Sheets("Template").Select
    Sheets("Template").Copy After:=Sheets(cnt)
    ActiveSheet.Name = Format(datefr, "mmm d yyyy")
    Next
End Sub

Open in new window

0
 
LVL 8

Accepted Solution

by:
wchh earned 500 total points
ID: 35124438
For Full Month Name,
ActiveSheet.Name = Format(datefr, "mmmm d yyyy")
0
 

Author Closing Comment

by:mmoralespr
ID: 35124581
Thanks wchh, it worked perfectly. I appreciate your help.

Take Care,

Michael
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now