+ Reply to Thread
Results 1 to 8 of 8

Copy tab with custom name without duplication

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    Leeds, UK
    MS-Off Ver
    MS Office 2016
    Posts
    77

    Copy tab with custom name without duplication

    Hello.. Hope all are doing well.
    I'm trying create multiple copy of a Template tab/sheet based on the table on Index tab. On Index tab i have a table Emp_ID (col A), Emp_name (col B) and Tab_name (Col C). The macro will create a copy of Template tab, set the tab name as Index col C tab name and take Emp_Id and Emp name and put it on E2 and E3 of new tab. The below macro is working fine.
    Please Login or Register  to view this content.
    Now i want to put a process to avoid creating duplicated tab. Means if i add more entry to Index table and run the macro then it will copy Template and create tab for the new entries only. For existing entries where a tab is already exist, it should not create duplicate tab. how do i do it?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,091

    Re: Copy tab with custom name without duplication

    Please check your Excel version is up-to-date in your profile. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Copy tab with custom name without duplication

    See next code

    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  4. #4
    Registered User
    Join Date
    06-09-2011
    Location
    Leeds, UK
    MS-Off Ver
    MS Office 2016
    Posts
    77

    Re: Copy tab with custom name without duplication

    Thanks for the code.
    When I'm executing the code with existing Tab, it's creating another tab as "Tab_Name". It's only getting created one time though. Is it expected?

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Copy tab with custom name without duplication

    Hops.
    Try next code

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-09-2011
    Location
    Leeds, UK
    MS-Off Ver
    MS Office 2016
    Posts
    77

    Re: Copy tab with custom name without duplication

    Excellent!! It's working fine now. Thanks a lot.

  7. #7
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Copy tab with custom name without duplication

    Good, you're welcome.

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Copy tab with custom name without duplication

    I forgot to mention that the list of Tabs in sheet "Index" in column "C" is now dynamic.

+ 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] Copy entry into a range if there is no duplication
    By GIS2013 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-04-2014, 06:03 PM
  2. [SOLVED] Row detection copy paste duplication
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2013, 08:40 PM
  3. copy custom range on value select
    By i.rajput in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2013, 06:15 AM
  4. VBA - copy cell value duplication issue
    By Dream Ahead in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2012, 03:52 PM
  5. Replies: 0
    Last Post: 06-13-2011, 04:53 PM
  6. Excel Live Sheet Duplication / Copy
    By scoopster in forum Excel General
    Replies: 2
    Last Post: 12-12-2007, 05:28 AM
  7. How can I copy a custom toolbar & put it on another pc?
    By R_Adams in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-09-2006, 02:50 PM

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