+ Reply to Thread
Results 1 to 8 of 8

duplicating rows every time the summary sheet is activated

  1. #1
    Registered User
    Join Date
    02-20-2017
    Location
    des moines, iowa
    MS-Off Ver
    excel 2013
    Posts
    27

    duplicating rows every time the summary sheet is activated

    hello all,
    I have log that records all new marketing requests and ranks them according to their score and their source. I have 5 worksheets: the Master (i'd really like this to be the only sheet that I manually enter data in, and the other sheets should update and rank themselves automatically), AM, OE, MT, and Project_Summary. We have to give all three sources equal opportunity, hence the difference worksheets, but I would then like the Project_summary sheet to pull from all three source sheets and sort them by rank, so that the summary sheet should list: #1 AM, #1 OE, #1 MT, #2 AM.... and so on.
    The issue I am having is that every time I activate the summary sheet, the macro copies everything over, and I end up with duplicates. Unfortunately, as it is now, I do not have a truly unique Identifier to easily determine duplicates.

    my current code is:

    Please Login or Register  to view this content.
    any help would be appreciated!! I have attached my workbook so that you may better understand what I am trying to do
    thanks in advance!
    Riley
    Attached Files Attached Files

  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: duplicating rows every time the summary sheet is activated

    I have not looked at the file or the code but what you need is to add an extra column. Now when the code is run you set the value for the row copied in that column to TRUE
    And in the code checking you only check is the value in that column is empty (or FALSE) the only those will be copied.
    I hope my explanation makes sense to you
    ---
    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
    02-20-2017
    Location
    des moines, iowa
    MS-Off Ver
    excel 2013
    Posts
    27

    Re: duplicating rows every time the summary sheet is activated

    Thanks for your reply Keebellah!
    your explanation does make sense, but unfortunately I'm extremely new to VBA and coding, and am not quite sure how to go about making that happen.. But that does seem to be the most efficient fix to the issue

  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: duplicating rows every time the summary sheet is activated

    I have looked at the file and I doubt it very much that it does anything at all.
    You're working with actual Tables which make things easier but you also address these incorrectly.
    You did not design this yourself so whoever helped you should be able to solve it for you.
    When you address a Listobject (Table) the appraoch is entirely different

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

    Re: duplicating rows every time the summary sheet is activated

    I corrected all the dimensioning and things but there are still errors in the code with Sheet loop
    The first statement is incorrect but I do not have the time now.
    Like I mentioned before this code never worked so what you are asking was incorrectly stated.
    You say you get duplicated values, true, but you never got anything since the code did not work in any way possible.
    You could be honest in stating that you received this file with code and do not know how to make it work.
    Or you copied something forthe forum but delivered a non-working version .

    Here is the file back without the dimensioning errors but still not working
    Attached Files Attached Files

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

    Re: duplicating rows every time the summary sheet is activated

    You could at least take the time to answer, but...
    Here's a possible solution
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-20-2017
    Location
    des moines, iowa
    MS-Off Ver
    excel 2013
    Posts
    27
    Sorry i havent had a chance to respond but i saw your earlier post and went back to my file and you are completely right nothing was working! I have no idea what i was thinking putting this post up i swore the program was working... I apologize for any headaches or annoyances ive caused.. And yes i did try to incorporate a code i had found and tried to modify it to suit my needs but have failed miserably. I really do apreciate the time you took to look into it even though you knew it was a mess. I will definitely look at the file tomorrow first thing! (I would do it tonight but i have mac 2007 excel and not sure how that well that will show this file) again thank you so much

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

    Re: duplicating rows every time the summary sheet is activated

    No problem, but it does help to be honest then the issues can be approached in another fashion.
    BTW, and VERY important ALWAYS mention the Excel version (and OS if it is not Windows) you are working with.
    I know from experience that Excel Apps I have developed do not work on a MAC, basic VBA might work the same so I home that my modifications will run on a MAC too.

    What it basically does now is copy the new rows from the Master sheet PROJECT_LOG table to the Summary Sheet PROJECT_SUMMARY table and places a TRUE when completed in the last column of the PROJECT_LOG.

    If you want to test it, just CLEAR a cell with the value TRUE and activate the Summary, this row will be added there.

    No need to go through each worksheet since all the data is in the Master anyway.

    Hope my explanation makes sense, and domn't make life difficult for yourself, just say what the issue is and what you have done, all the guys here try their best, we do this to help out and with every questions or post we learn too

+ 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. Help, Duplicating a sheet with duplicating ability
    By joseph_pat in forum Excel General
    Replies: 7
    Last Post: 06-26-2015, 07:55 AM
  2. Duplicating rows to another sheet with update button problem
    By ericmday in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2014, 06:09 PM
  3. Replies: 1
    Last Post: 07-06-2013, 05:14 AM
  4. Replies: 6
    Last Post: 04-15-2013, 07:28 AM
  5. Summary Time Sheet for all Employees
    By prkhan56 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2012, 03:16 AM
  6. Replies: 2
    Last Post: 06-29-2012, 10:57 AM
  7. Populate summary sheet (insert & index rows from info in columns on another sheet)
    By DerbysGal in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2011, 01:54 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