+ Reply to Thread
Results 1 to 4 of 4

Stop Duplication of table

  1. #1
    Registered User
    Join Date
    01-31-2018
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    17

    Stop Duplication of table

    In Sheet QDS, when you press "Create QDS", It fetches names from MML sheet in Row 6, starting from Column V, and then go horizontally. And create copy of table with that name.

    My problem is if I add new sheet, (that can be added from "customer" tab) And then press “create qds” button, then it duplicates table in qds sheet

    I want to stop this duplication

    I am attaching file here
    Attached Files Attached Files
    Last edited by pm.patel189; 03-16-2018 at 08:31 PM.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Stop Duplication of table

    I suggest you review your macro code, you never check if the table is there and just keep appending.
    The worksheets more or less the same Worksheets(60.Copy after ... well which is (6) and yes the whole sheet is copied, just do a worksheets.add and then give the new sheet which is the active sheet the moment you add a name but check is the name already exists.
    I say, 'back to the drawing board'
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    01-31-2018
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    17

    Re: Stop Duplication of table

    @keebellah. Thanks for reaponse. My wordings are wrong jn first message. I am talking about table in QDS sheet. My sheet already had 2 sheets named pm and asd. Now when you open QDS sheet press “Create QDS” button couple of times, you will see that table in that sheet created multiple times. What i want is if no new sheet exists aprat from pm and asd then pressing button shouldn't do nothing and if new sheet is added then it should add just 3rd table with new sheet name. I dont how to do this
    Last edited by pm.patel189; 03-16-2018 at 08:36 PM.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Stop Duplication of table

    Yu will have to check if the name already exists then skip and do the next one

    Please Login or Register  to view this content.
    The line marked red is the one that adds the new table

    So what you have to do is check if the name exists in
    So you create a loop starting with row 9 and lop in step 8 (because after 8 rows a new table begins , 9 is the first 9+8 = 17 is the next one, etc.)
    Since it's your code you understand it better but this the idea.

+ 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. Create a third table from two others, without duplication
    By Hezcal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2015, 10:19 AM
  2. Duplication Issues With Pivot Table
    By xybadog in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 02-27-2015, 07:25 AM
  3. Stop duplication in a combo box
    By 10121730 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2012, 07:54 PM
  4. Pivot Table dealing with duplication
    By Mike Shamrock in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-08-2006, 02:19 AM
  5. Duplication of labels within pivot table
    By sooner in forum Excel General
    Replies: 0
    Last Post: 05-04-2006, 09:38 AM
  6. [SOLVED] Stop Number duplication in a range
    By Nu-bEE in forum Excel General
    Replies: 5
    Last Post: 03-21-2005, 01:06 PM
  7. [SOLVED] How do I stop duplication of cell data from a list (you can only .
    By nan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2005, 05:08 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