+ Reply to Thread
Results 1 to 6 of 6

Delete duplicates based on if multiple Column data is the same

  1. #1
    Registered User
    Join Date
    11-28-2018
    Location
    Netherlands
    MS-Off Ver
    Office 13
    Posts
    30

    Delete duplicates based on if multiple Column data is the same

    Hey All,

    I am using a macro that imports raw data from one sheet called “Daily Input”, to another Sheet called “Database” where it is stored neatly and organized.

    I need to incorporate logic to delete dups. Where, if in Sheet "Database" 2 or more rows have identical data in Column A, C, F, G, H (Date, Client, Side, Size, Item Code), it is clearly a dup, so the macro delete those duplicate rows from Sheet "Database" and only keep one unique row. My data in "Database" starts on Row 3 and last row is dynamically increasing

    The real spread sheet I am using has +20,000 rows so Looping could make the code runtime long, scripting dictionaries or other ways may work best I just can’t figure it out…

    Many thanks Excel Forum community!
    Attached Files Attached Files
    Last edited by stein7; 03-25-2019 at 01:28 PM.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,112

    Re: Delete duplicates based on if multiple Column data is the same

    How about
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-28-2018
    Location
    Netherlands
    MS-Off Ver
    Office 13
    Posts
    30

    Re: Delete duplicates based on if multiple Column data is the same

    Thanks for looking at this Fluff, this is definitely the way I want to go about it. Code breaks and doesn't work... FYI to clarify the code only needs to run on Sheet ("Database"), and delete dups based on the column data (1, 3, 6, 7, 8). The first row of data on Sheet Database is row 3 and ast row is dynamically increasing.... Praying you can hlep me with this last bit to get it working.
    Last edited by stein7; 03-25-2019 at 01:28 PM.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,112

    Re: Delete duplicates based on if multiple Column data is the same

    Ok, how about
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-28-2018
    Location
    Netherlands
    MS-Off Ver
    Office 13
    Posts
    30

    Re: Delete duplicates based on if multiple Column data is the same

    Hi Fluff, I was praying you can help me do one last thing. In the same sheet, before I run this code that deletes dups.

    I am trying to aggregate the data based on if column A, C, F, H are the same, meaning if there are multiple rows with values in those columns that are the same than I want to aggregate it into one row.. while aggregating, the newly formed row would take the SUM of column G, and Weighted Average in column I ([col G times col I] divided by sum of col g)... I am asking you because you are using scripting dicitonaries which is the way to go about this, however I am not too familiar with how to do them....

    Would be forever greatful if oyu had any ideas
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,112

    Re: Delete duplicates based on if multiple Column data is the same

    This will sum col G
    Please Login or Register  to view this content.
    I haven't done anything about col I, because from what I can see the prices don't change.

+ 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. Delete duplicates based on if multiple Column data is the same
    By stein7 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2019, 12:39 PM
  2. [SOLVED] Add up quantitites in Column E based on duplicates in Column A, then delete duplicates
    By eli-vergara in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2016, 05:44 PM
  3. Replies: 8
    Last Post: 08-08-2013, 08:45 AM
  4. How do you delete a row based on duplicates in one column
    By Franklic in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-14-2012, 01:21 AM
  5. Delete duplicates in one column, based on dates of another?
    By eptesicus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-21-2012, 02:44 PM
  6. highlight duplicates based on multiple column data
    By just_some_dude in forum Excel General
    Replies: 4
    Last Post: 08-31-2012, 01:37 PM
  7. Replies: 4
    Last Post: 07-27-2010, 08:24 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