+ Reply to Thread
Results 1 to 6 of 6

Rename Sheet with date and string

  1. #1
    Registered User
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    94

    Rename Sheet with date and string

    My code for renaming sheet using date in a range works but I can't seem to modify it correctly to also include a text string.

    Please Login or Register  to view this content.
    "8/1/23" date is in A7. "Meet&Greet" is string is in G7:

    Current code works and renames sheet "Sep23" but I want it to read "Aug23-Meet&Greet".

    Thank you for your help!

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Rename Sheet with date and string

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Try this !


    Quote Originally Posted by KerahJoy View Post
    I want it to read "Aug23-Meet&Greet".
    So removing the useless :

    PHP Code: 
    Private Sub Worksheet_Change(ByVal Target As Range)
        If 
    Target.Address "$A$7" Then Name IIf(IsEmpty(Target), "Event" Index 1Format(Target"mmmyy-") & [G7])
    End Sub 
    ► Do you like it ? ► So thanks to click on bottom left star icon « Add Reputation » !

  4. #4
    Registered User
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    94

    Re: Rename Sheet with date and string

    That worked thanks Mumps

  5. #5
    Registered User
    Join Date
    03-12-2022
    Location
    Atlanta, Georgia
    MS-Off Ver
    365
    Posts
    94

    Re: Try this !

    Thanks Marc

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: Rename Sheet with date and string

    Glad to help.

+ 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] Duplicate sheet multiple times and rename each wcomma separated string in cell
    By michellepace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-21-2017, 02:13 AM
  2. [SOLVED] Add a new sheet and rename tab with a date
    By chrisrick in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-07-2014, 12:36 PM
  3. Rename sheet with yesterdays date
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2014, 02:59 AM
  4. Replies: 4
    Last Post: 08-16-2013, 04:10 AM
  5. copy master sheet and rename sheet with date format
    By peter renton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2013, 02:08 PM
  6. Macro to rename a sheet using a date.
    By acstellato in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-20-2010, 06:13 PM
  7. Rename a sheet with a specific date
    By Mistweaver in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-23-2009, 06:21 PM

Tags for this Thread

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