Great Macro Don! Very helpful for my task... I really appreciate your assistance with this and you were also very fast at responding.
You are awesome :-) Sunnie On Wed, Dec 7, 2011 at 4:51 PM, dguillett1 <dguille...@gmail.com> 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 > dguille...@gmail.com > -----Original Message----- From: Susan 1 > Sent: Wednesday, December 07, 2011 6:14 PM > > To: excel-macros@googlegroups.com > 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 <dguille...@gmail.com> wrote: > >> >> Attach your final result for comments >> >> >> Don Guillett >> SalesAid Software >> dguille...@gmail.com >> -----Original Message----- >> From: Susan 1 >> Sent: Wednesday, December 07, 2011 5:56 PM >> To: excel-macros@googlegroups.com >> 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 <dguille...@gmail.com> 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 >>> dguille...@gmail.com >>> >>> From: Susan 1 >>> Sent: Wednesday, December 07, 2011 2:10 PM >>> To: excel-macros@googlegroups.com >>> 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 <dguille...@gmail.com> 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 >>> dguille...@gmail.com >>> >>> From: Susan 1 >>> Sent: Tuesday, December 06, 2011 6:25 PM >>> To: excel-macros@googlegroups.com >>> 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-macros@googlegroups.com >>> >>> -- >>> 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-macros@googlegroups.com >>> >>> >>> -- >>> 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-macros@googlegroups.com >>> >>> -- >>> 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-macros@googlegroups.com >>> >>> >> -- >> 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-macros@googlegroups.com >> >> -- >> 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-macros@googlegroups.com >> >> > -- > 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-macros@googlegroups.com > -- > 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-macros@googlegroups.com > -- 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-macros@googlegroups.com