+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : deleting duplicates but keeping row values

  1. #1
    Registered User
    Join Date
    10-21-2009
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    deleting duplicates but keeping row values

    I want to summarize some data across rows in a large spreadsheet. There is a duplicate value, and I'd like to basically consolidate all the data in rows that match that value:

    50253 5 A
    50253 5 C
    50253 5 F
    50253 5 G
    50253 5 H


    Should consolidate down to a single row:

    50253 5 A C F G H

    Any ideas?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: deleting duplicates but keeping row values

    Hi Moldoverb. I have a Consolidate macro for this, but it is critical to understanding the columns before it can be tweaked for you.

    Is that a 3-column example dataset? Do columns A and B both have to match to be considered "the same"? Or just column A?
    Can the data be sorted prior to consolidation to insure all like items are adjacent, like in your example?

    Any chance you can simply post a usable sample set of data to test on? Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: deleting duplicates but keeping row values

    Here's the basic macro for comparing matches in columns A & B and merging all the column C data into row format.
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 10-21-2009 at 02:52 PM.

  4. #4
    Registered User
    Join Date
    10-21-2009
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: deleting duplicates but keeping row values

    Thanks, well it's a data set where I am looking at a number of samples (A,C,E,F,G,H) trying to find out what is in common (second column). The third column is an occurrence count and actually not important since I deleted all entries <4 samples in common. File is attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-21-2009
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: deleting duplicates but keeping row values

    Still looking for an answer to this question.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: deleting duplicates but keeping row values

    Perhaps a shorter sample of data where you show us both the BEFORE and AFTER. I can't see anything that would would "join" based on that data, so a visual example might make it clear.

  7. #7
    Registered User
    Join Date
    10-21-2009
    Location
    Philadelphia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: deleting duplicates but keeping row values

    I just figure out how to do this with a pivot table. Thanks for the advice, though!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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