+ Reply to Thread
Results 1 to 5 of 5

Macro to Change Sheet Names to Date Range

  1. #1
    Registered User
    Join Date
    01-13-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro to Change Sheet Names to Date Range

    Hello,
    Does anyone have a simple Macro that I can use to Autofill the Sheet Names (Sheet1, Sheet2, etc) to a specific date range?
    I would like to name the first sheet the last day of the first week of January, 2014 (20140104), then the next sheet eight days later (20140111), and so on to the end of the calendar year (20141227).
    The date does not have to be in this format.

    Thanks...

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Macro to Change Sheet Names to Date Range

    Try this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-13-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to Change Sheet Names to Date Range

    That did not quite do what I hoped. It only did three sheets so I figured that was because there were only three sheets open. I created 52 sheets and tried again. This kind of worked except it didn't do the date range as hoped. It treated it just like a number incrementing by 7, so instead of going from January (20140131), it just kept going counting up by seven (20140139) instead of going into February (20140206).
    Can you help me by giving me a different date format...maybe mmddyyyy displayed as 01/15/2014 (for January 15, 2014, for example)?

    I am so close, but so far away, so thank you for helping me.

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Macro to Change Sheet Names to Date Range

    Only small change is required to Alan's code:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  5. #5
    Registered User
    Join Date
    01-13-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to Change Sheet Names to Date Range

    That's perfect. Thank you so much for the code. I'll put it to good use.

+ 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] extract date format sheet names into range vba
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-03-2014, 10:16 AM
  2. Macro to add a line containing indirect, change sheet names in formula
    By bcas77 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-16-2013, 01:20 PM
  3. Replies: 3
    Last Post: 03-07-2011, 03:18 AM
  4. Macro Saves & Names File with Current Date & Range
    By BluTalon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-30-2008, 03:51 PM
  5. How to change XL sheet names from cell range
    By Bila in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-11-2005, 11:35 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