I realise this is an old post but the solution is just what I need with one 
slight alteration.

Would it be possible to ask for the start date in stead of hard coding it?

Windy

On Thursday, December 8, 2011 12:51:37 AM UTC, Don Guillett wrote:
>
> Not really. It was using the first Sunday of the current year and adding a 
> 7 
> days so you would have 52 sheets.
> I have changed it to use Jan 1, 2012 as the starting date, adding a week 
> for 
> each sheet. See attached,
>
> Don Guillett
> SalesAid Software
> dguil...@gmail.com <javascript:>
> -----Original Message----- 
> From: Susan 1
> Sent: Wednesday, December 07, 2011 6:14 PM
> To: excel-...@googlegroups.com <javascript:>
> Subject: Re: $$Excel-Macros$$ Formula or macro to add names to sheets in 
> one 
> workbook
>
> So your macro works, but it is for 365 days, and now I have 365
> sheets, I needed the sheets to be named according to the week dates,
> starting like this
> Jan 01-Jan 07, 2012 all the way down to Dec 30-Jan 05, 2013
>
> Can you fix the code for me...
>
> Thanks again!
>
> On 12/7/11, dguillett1 <dguil...@gmail.com <javascript:>> wrote:
> >
> > Attach your final result for comments
> >
> >
> > Don Guillett
> > SalesAid Software
> > dguil...@gmail.com <javascript:>
> > -----Original Message-----
> > From: Susan 1
> > Sent: Wednesday, December 07, 2011 5:56 PM
> > To: excel-...@googlegroups.com <javascript:>
> > Subject: Re: $$Excel-Macros$$ Formula or macro to add names to sheets in 
> > one
> > workbook
> >
> > I believe then I'll need to make a template sheet :-)... okay thanks
> > for clarifying it! :-)
> > Appreciated!!
> >
> >
> > On 12/7/11, dguillett1 <dguil...@gmail.com <javascript:>> wrote:
> >> The macro assumes that you do, indeed, have a sheet named Template that
> >> you
> >> want to copy and name jan 03, jan 10, etc.
> >>
> >> Don Guillett
> >> SalesAid Software
> >> dguil...@gmail.com <javascript:>
> >>
> >> From: Susan 1
> >> Sent: Wednesday, December 07, 2011 2:10 PM
> >> To: excel-...@googlegroups.com <javascript:>
> >> Subject: Re: $$Excel-Macros$$ Formula or macro to add names to sheets in
> >> one
> >> workbook
> >>
> >> I copied and pasted your code from below in a blank spreadsheet and 
> when 
> >> I
> >> run it I received the following error: Script out of range.
> >>
> >> Please advise.
> >>
> >> Thanks!
> >>
> >>
> >> On Wed, Dec 7, 2011 at 7:04 AM, dguillett1 
> >> <dguil...@gmail.com<javascript:>> 
> wrote:
> >>
> >>   This macro will copy the template and name each sheet with the start 
> of
> >> the week (short names better)
> >>   If you want the first MONDAY then change ,7 to ,8
> >>   Option Explicit
> >>   Sub addsheets()
> >>   Dim i As Long
> >>   For i = Day(DateSerial(Year(Date), 1, 7) - _
> >>   WeekDay(DateSerial(Year(Date), 1, 6))) To 365 Step 7
> >>   Sheets("Template").Copy After:=Sheets(Sheets.Count)
> >>   ActiveSheet.Name = _
> >>     Format(DateSerial(Year(Date), 1, i), "mmm dd")
> >>   Next i
> >>   End Sub
> >>
> >>
> >>   �=========
> >>   Don Guillett
> >>   SalesAid Software
> >>   dguil...@gmail.com <javascript:>
> >>
> >>   From: Susan 1
> >>   Sent: Tuesday, December 06, 2011 6:25 PM
> >>   To: excel-...@googlegroups.com <javascript:>
> >>   Subject: $$Excel-Macros$$ Formula or macro to add names to sheets in 
> >> one
> >> workbook
> >>
> >>   Hi,
> >>   I have project at work to create sheets in a workbook , and the sheet
> >> names are based on 2012 calendar weeks, (I've attached the workboo).
> >>
> >>   I need to know if there is way to easily add the weeks of the calendar
> >> to
> >> each sheet.
> >>   And Also I don't know how to eliminate the circular reference, after 
> >> you
> >> open the workbook.
> >>   Any help is appreciated!
> >>
> >>
> >>   Sunnie
> >>   --
> >>   FORUM RULES (934+ members already BANNED for violation)
> >>
> >>   1) Use concise, accurate thread titles. Poor thread titles, like 
> Please
> >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> >> will
> >> not get quick attention or may not be answered.
> >>
> >>   2) Don't post a question in the thread of another member.
> >>
> >>   3) Don't post questions regarding breaking or bypassing any security
> >> measure.
> >>
> >>   4) Acknowledge the responses you receive, good or bad.
> >>
> >>   5) Cross-promotion of, or links to, forums competitive to this forum 
> in
> >> signatures are prohibited.
> >>
> >>   NOTE : Don't ever post personal or confidential data in a workbook.
> >> Forum
> >> owners and members are not responsible for any loss.
> >>
> >>
> >> 
> ------------------------------------------------------------------------------------------------------
> >>   To post to this group, send email to 
> >> excel-...@googlegroups.com<javascript:>
> >>
> >>   --
> >>   FORUM RULES (934+ members already BANNED for violation)
> >>
> >>   1) Use concise, accurate thread titles. Poor thread titles, like 
> Please
> >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> >> will
> >> not get quick attention or may not be answered.
> >>
> >>   2) Don't post a question in the thread of another member.
> >>
> >>   3) Don't post questions regarding breaking or bypassing any security
> >> measure.
> >>
> >>   4) Acknowledge the responses you receive, good or bad.
> >>
> >>   5) Cross-promotion of, or links to, forums competitive to this forum 
> in
> >> signatures are prohibited.
> >>
> >>   NOTE : Don't ever post personal or confidential data in a workbook.
> >> Forum
> >> owners and members are not responsible for any loss.
> >>
> >>
> >> 
> ------------------------------------------------------------------------------------------------------
> >>   To post to this group, send email to 
> >> excel-...@googlegroups.com<javascript:>
> >>
> >>
> >> --
> >> FORUM RULES (934+ members already BANNED for violation)
> >>
> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> >> will
> >> not get quick attention or may not be answered.
> >>
> >> 2) Don't post a question in the thread of another member.
> >>
> >> 3) Don't post questions regarding breaking or bypassing any security
> >> measure.
> >>
> >> 4) Acknowledge the responses you receive, good or bad.
> >>
> >> 5) Cross-promotion of, or links to, forums competitive to this forum in
> >> signatures are prohibited.
> >>
> >> NOTE : Don't ever post personal or confidential data in a workbook. 
> Forum
> >> owners and members are not responsible for any loss.
> >>
> >> 
> ------------------------------------------------------------------------------------------------------
> >> To post to this group, send email to 
> >> excel-...@googlegroups.com<javascript:>
> >>
> >> --
> >> FORUM RULES (934+ members already BANNED for violation)
> >>
> >> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> >> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> >> will
> >> not get quick attention or may not be answered.
> >>
> >> 2) Don't post a question in the thread of another member.
> >>
> >> 3) Don't post questions regarding breaking or bypassing any security
> >> measure.
> >>
> >> 4) Acknowledge the responses you receive, good or bad.
> >>
> >> 5)  Cross-promotion of, or links to, forums competitive to this forum in
> >> signatures are prohibited.
> >>
> >> NOTE  : Don't ever post personal or confidential data in a workbook. 
> >> Forum
> >> owners and members are not responsible for any loss.
> >>
> >> 
> ------------------------------------------------------------------------------------------------------
> >> To post to this group, send email to 
> >> excel-...@googlegroups.com<javascript:>
> >>
> >
> > --
> > FORUM RULES (934+ members already BANNED for violation)
> >
> > 1) Use concise, accurate thread titles. Poor thread titles, like Please
> > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
> > will
> > not get quick attention or may not be answered.
> >
> > 2) Don't post a question in the thread of another member.
> >
> > 3) Don't post questions regarding breaking or bypassing any security
> > measure.
> >
> > 4) Acknowledge the responses you receive, good or bad.
> >
> > 5)  Cross-promotion of, or links to, forums competitive to this forum in
> > signatures are prohibited.
> >
> > NOTE  : Don't ever post personal or confidential data in a workbook. 
> Forum
> > owners and members are not responsible for any loss.
> >
> > 
> ------------------------------------------------------------------------------------------------------
> > To post to this group, send email to excel-...@googlegroups.com<javascript:>
> >
> > --
> > FORUM RULES (934+ members already BANNED for violation)
> >
> > 1) Use concise, accurate thread titles. Poor thread titles, like Please
> > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
> > will
> > not get quick attention or may not be answered.
> >
> > 2) Don't post a question in the thread of another member.
> >
> > 3) Don't post questions regarding breaking or bypassing any security
> > measure.
> >
> > 4) Acknowledge the responses you receive, good or bad.
> >
> > 5)  Cross-promotion of, or links to, forums competitive to this forum in
> > signatures are prohibited.
> >
> > NOTE  : Don't ever post personal or confidential data in a workbook. 
> Forum
> > owners and members are not responsible for any loss.
> >
> > 
> ------------------------------------------------------------------------------------------------------
> > To post to this group, send email to excel-...@googlegroups.com<javascript:>
> >
>
> -- 
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please 
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice 
> will 
> not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security 
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5)  Cross-promotion of, or links to, forums competitive to this forum in 
> signatures are prohibited.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
> owners and members are not responsible for any loss.
>
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-...@googlegroups.com<javascript:> 
>
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to