+ Reply to Thread
Results 1 to 7 of 7

Sheet names as dates

  1. #1
    Forum Contributor
    Join Date
    11-13-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    464

    Sheet names as dates

    I am a total VBA noob, so please forgive me.

    Attached you will find a 7 day workbook. I have labeled each sheet as a day of the week, and I would prefer to use the date. At the top of each sheet, I want the date as well. On the first sheet, I used the =TODAY() function. On the summary page where I listed the dates, I used the TODAY result from the SAT sheet then just used a +1 for the additional dates. I want the user(s) to select the proper sheet based on the current day of the week (or date), and I would like each of those sheets to be named as that date as well as have the dates appear in the B3 and B45 cells on each respective sheet. I hope this makes sense. i believe it will require VBA. I have NO idea how to add or apply VBA, so a step-by-step would be greatly appreciated. Thanks!!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    11-13-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    464

    Re: Sheet names as dates

    I should have stated that a new version of the workbook will be created each Saturday, so if you look at the Date (B3) it is supposed to reflect Saturday's date (which is why I used the TODAY function there).

    Also, is there a way to automate the creation of multiple versions of this workbook so that each Saturday starts with the appropriate date, or do I just have to manually create them and manually insert the dates?

  3. #3
    Forum Contributor
    Join Date
    11-13-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    464

    Re: Sheet names as dates

    I went back and changed the values for B3 on each page to reference B3 on SAT, so the dates on each page are no longer an issue, but I still want the first date to reflect whatever the date is on Saturday then that date is locked in as a value.

  4. #4
    Forum Contributor
    Join Date
    11-13-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    464

    Re: Sheet names as dates

    Solved it myself. I will leave the first date B3 blank and have it be filled in by the user, and all the subsequent dates check for a value then add the appropriate number of days based on which page they are on.

  5. #5
    Forum Contributor
    Join Date
    11-13-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    464

    Re: Sheet names as dates

    Found this in a very old thread. Will try it tomorrow.



    Private Sub Workbook_NewSheet(ByVal Sh As Object)

    Application.ScreenUpdating = False


    Sheets("start").Cells.Copy Destination:=Sh.Range("A1")
    Sheets("start").Range("A1").Value = Sheets("start").Range("A1").Value + 1
    ActiveSheet.Name = Format(Range("A1").Value, "dd.mm.yy ddd")


    Application.ScreenUpdating = True

    End Sub

  6. #6
    Forum Contributor
    Join Date
    11-13-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    464

    Re: Sheet names as dates

    I tried to enter the above code into my workbook, but i'm sure that i must be doing something wrong. Can someone please look at the previous posts in this thread and, using the code in the post above this one, please tell me how to do it. Thanks!

  7. #7
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Sheet names as dates

    try this out .. the code will create a new sheet from a template sheet and name the tab with the 3 letter day (example: Sun, Mon etc..)but you will need to run the code on the date that the new sheet is needed .. run the code on Sat to create the Sat sheet.. the only problem with this will be with your summary sheet formulas that reference the sheet name.
    Also it will place the date on the sheet in cells B3 and B45
    Attached Files Attached Files
    Last edited by moonsaga; 12-11-2013 at 11:56 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Create an Array which has Sheet Names excluding a Few Sheet Names to be used in a MACRO
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-29-2013, 03:24 PM
  2. Change sheet names by dates, not cell value
    By roachiepie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2012, 04:42 PM
  3. Replies: 6
    Last Post: 02-01-2012, 10:27 AM
  4. Getting a list of Sheet Names by excluding certain Sheet Names instantenously..
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-09-2012, 12:16 PM
  5. [SOLVED] Need sopme help coding Dates and Sheet names. (Please)
    By Dean Goodmen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2005, 07:45 AM

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