+ Reply to Thread
Results 1 to 5 of 5

Macro to check if sheet name exits

  1. #1
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    165

    Macro to check if sheet name exits

    Hi All,

    I have this macro, but I like to add if sheet name already exits in workbook then nothing happen or it add a something else at the back. for exp if sheet1 already in the workbook then it add sheet11 or anything.
    Thanks in advance for help
    RR



    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Macro to check if sheet name exits

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    165

    Re: Macro to check if sheet name exits

    Thank you very much,
    Is the other option available if sheets exits then it delete the exiting one and add new one or change the name with adding sonmthing at the back.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Macro to check if sheet name exits

    adding something at the back is the most challenging of the two options you suggested because you have to recheck to see if the "something at the back" sheet already exists and if so you need 2 "something at the back". Then you have to check the 2 "something at the back" and so on. It is possible to code but takes a bit of time. Quicker to go with your first option which is just to delete the sheet.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    165

    Re: Macro to check if sheet name exits

    Thank you very much for your time and help. This will works for me.

+ 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. How do I auto select yes when macro exits a report
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2014, 12:37 PM
  2. [SOLVED] Adjust a macro to check for content of a cell and then run a macro on target sheet
    By dreddster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2013, 04:37 AM
  3. Replies: 1
    Last Post: 05-29-2013, 01:20 PM
  4. Macro exits prematurely from function after calling other function
    By LouisPhilippe in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 03:22 AM
  5. Reprotect after macro exits.
    By D1TrueGod in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2008, 12:34 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