+ Reply to Thread
Results 1 to 4 of 4

Renaming Worksheets

  1. #1
    Steve Walford
    Guest

    Renaming Worksheets

    Is there any easy way to rename or name worksheets

    I have a 52 page spread sheet, each page represents a week and is
    named like so
    1st January,8th January,15thJanary etc

    The date used represents the first day of the week (Monday)

    The next year I copy the spreadsheet and delete all the data, but the
    date on the page does no correspond to Monday so I have to rename all
    the sheets

    Is there an easier way

    Thanks


  2. #2
    Gary Brown
    Guest

    RE: Renaming Worksheets

    How about WEEK01, WEEK02, WEEK03.... ?
    HTH,
    Gary Brown


    "Steve Walford" wrote:

    > Is there any easy way to rename or name worksheets
    >
    > I have a 52 page spread sheet, each page represents a week and is
    > named like so
    > 1st January,8th January,15thJanary etc
    >
    > The date used represents the first day of the week (Monday)
    >
    > The next year I copy the spreadsheet and delete all the data, but the
    > date on the page does no correspond to Monday so I have to rename all
    > the sheets
    >
    > Is there an easier way
    >
    > Thanks
    >
    >


  3. #3
    Gary Brown
    Guest

    RE: Renaming Worksheets

    That said,
    Except for the 'st', 'nd', 'th', try this...
    '/=================================================/
    Sub Test_Change_WkshtName()
    Dim wksht As Worksheet
    Dim dtStart As Date, dtWksht As Date

    '1st Monday of the Year
    dtStart = DateValue("01/04/2005")

    dtWksht = dtStart

    For Each wksht In Worksheets
    wksht.Name = Format(dtWksht, "dd mmmm")
    dtWksht = dtWksht + 7
    Next wksht

    End Sub
    '/=================================================/
    HTH,
    Gary Brown


    "Gary Brown" wrote:

    > How about WEEK01, WEEK02, WEEK03.... ?
    > HTH,
    > Gary Brown
    >
    >
    > "Steve Walford" wrote:
    >
    > > Is there any easy way to rename or name worksheets
    > >
    > > I have a 52 page spread sheet, each page represents a week and is
    > > named like so
    > > 1st January,8th January,15thJanary etc
    > >
    > > The date used represents the first day of the week (Monday)
    > >
    > > The next year I copy the spreadsheet and delete all the data, but the
    > > date on the page does no correspond to Monday so I have to rename all
    > > the sheets
    > >
    > > Is there an easier way
    > >
    > > Thanks
    > >
    > >


  4. #4
    Steve Walford
    Guest

    Re: Renaming Worksheets

    Garry this did exactly what I wanted

    Many Thanks

    Steve


    On Tue, 29 Mar 2005 12:37:07 -0800, "Gary Brown"
    <[email protected]> wrote:

    >That said,
    > Except for the 'st', 'nd', 'th', try this...
    >'/=================================================/
    >Sub Test_Change_WkshtName()
    > Dim wksht As Worksheet
    > Dim dtStart As Date, dtWksht As Date
    >
    > '1st Monday of the Year
    > dtStart = DateValue("01/04/2005")
    >
    > dtWksht = dtStart
    >
    > For Each wksht In Worksheets
    > wksht.Name = Format(dtWksht, "dd mmmm")
    > dtWksht = dtWksht + 7
    > Next wksht
    >
    >End Sub
    >'/=================================================/
    >HTH,
    >Gary Brown
    >
    >
    >"Gary Brown" wrote:
    >
    >> How about WEEK01, WEEK02, WEEK03.... ?
    >> HTH,
    >> Gary Brown
    >>
    >>
    >> "Steve Walford" wrote:
    >>
    >> > Is there any easy way to rename or name worksheets
    >> >
    >> > I have a 52 page spread sheet, each page represents a week and is
    >> > named like so
    >> > 1st January,8th January,15thJanary etc
    >> >
    >> > The date used represents the first day of the week (Monday)
    >> >
    >> > The next year I copy the spreadsheet and delete all the data, but the
    >> > date on the page does no correspond to Monday so I have to rename all
    >> > the sheets
    >> >
    >> > Is there an easier way
    >> >
    >> > Thanks
    >> >
    >> >



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1