+ Reply to Thread
Results 1 to 4 of 4

Auto generate a date as a name for worksheets in a workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Auto generate a date as a name for worksheets in a workbook

    Hello, I am creating a workbook to track hours worked, vacay hours accrued, etc. I have it set up to use each worksheet as a pay period. How could I auto generate sheet tabs for every two weeks. For example 12/16/12, 12/30/12, etc. Also is there a way to add an employee row in a worksheet and have it automatically added in all the following pay periods.
    Thanks

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Auto generate a date as a name for worksheets in a workbook

    Here is a tab maker macro:

    Sub SheetMaker()
    For i = 0 To 99
    Sheets.Add
        ActiveSheet.Name = Format(DateSerial(2012, 12, 16) + 14 * (i - 1), "mm_dd_yyyy")
    Next
    End Sub
    Gary's Student

  3. #3
    Registered User
    Join Date
    12-12-2012
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Auto generate a date as a name for worksheets in a workbook

    Awesome! Thanks. Any idea how to write a formula so that if I add a row and name on the first date (12_16_2012) then it adds it to the rest of the date/sheets?

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Auto generate a date as a name for worksheets in a workbook

    A tiny trick!

    If you "group" the sheets at the bottom (select more than one), what you enter in one sheet will be entered in all of them.

+ 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