+ Reply to Thread
Results 1 to 4 of 4

Remove duplicates but consolidate data from removed

  1. #1
    Registered User
    Join Date
    01-06-2017
    Location
    va
    MS-Off Ver
    10
    Posts
    2

    Remove duplicates but consolidate data from removed

    Hello,

    I have an issue that I hope has a solution. I have a very simple spreadsheet, with two columns, Accnt # and Grade. In some instances, my reporting tool is limited, so if I have multiple grades for one account number, it creates a new row for each grade, creating duplicates. Is there a way to remove the duplicates and consolidate each grade onto one line? Example:

    ACCOUNT # GRADE

    1234 B+
    1234 C+
    1356 D
    1400 A-
    1400 B-

    Remove and consolidate to:

    1234 B+, C+
    1356 D
    1400 A-, B-

    It would be ok if these grades are in the same cell comma separated or in consecutive cells. Is there a way to do this. I have thousands of records with this going on. Any help is appreciated.
    Last edited by LHerndon; 01-06-2017 at 11:42 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Remove duplicates but consolidate data from removed

    With the data sorted by account, add a column with the formula shown:

    A
    B
    C
    D
    1
    Acct
    Grade
    Grades
    2
    1200
    C- C-, D-, D+, B- C2: =IF(A2=A3, B2 & ", " & C3, B2)
    3
    1200
    D- D-, D+, B-
    4
    1200
    D+ D+, B-
    5
    1200
    B- B-
    6
    1201
    D D
    7
    1202
    D- D-
    8
    1203
    B B, B-
    9
    1203
    B- B-
    10
    1204
    C C
    11
    1206
    C C, A-, B+
    12
    1206
    A- A-, B+
    13
    1206
    B+ B+
    14
    1207
    D- D-
    15
    1208
    D+ D+
    16
    1209
    C- C-
    17
    1210
    A+ A+
    18
    1212
    A- A-, B-, C
    19
    1212
    B- B-, C
    20
    1212
    C C
    21
    1213
    B+ B+
    22
    1214
    C- C-
    23
    1217
    B B, D-, D+, A-
    24
    1217
    D- D-, D+, A-
    25
    1217
    D+ D+, A-
    26
    1217
    A- A-
    27
    1218
    D D, C, B+
    28
    1218
    C C, B+
    29
    1218
    B+ B+
    30
    1219
    B B
    31
    1220
    C C, B+
    32
    1220
    B+ B+


    Then copy col C, paste as values, select all three columns, and remove duplicates in col A:

    A
    B
    C
    1
    Acct
    Grade
    Grades
    2
    1200
    C- C-, D-, D+, B-
    3
    1201
    D D
    4
    1202
    D- D-
    5
    1203
    B B, B-
    6
    1204
    C C
    7
    1206
    C C, A-, B+
    8
    1207
    D- D-
    9
    1208
    D+ D+
    10
    1209
    C- C-
    11
    1210
    A+ A+
    12
    1212
    A- A-, B-, C
    13
    1213
    B+ B+
    14
    1214
    C- C-
    15
    1217
    B B, D-, D+, A-
    16
    1218
    D D, C, B+
    17
    1219
    B B
    18
    1220
    C C, B+


    Then you can delete col B.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-06-2017
    Location
    va
    MS-Off Ver
    10
    Posts
    2

    Thumbs up Re: Remove duplicates but consolidate data from removed

    Perfect. Thank you. Saved me a lot of time.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Remove duplicates but consolidate data from removed

    You're welcome.

+ 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. EASY Solution Required & a Merry Christmas to All!!!
    By AliGW in forum The Water Cooler
    Replies: 11
    Last Post: 12-24-2015, 03:33 PM
  2. Need an easy solution to comparing two spreadsheets
    By sbahner219 in forum Excel General
    Replies: 8
    Last Post: 01-14-2015, 07:43 PM
  3. Should be an easy solution
    By Stuie in forum Excel General
    Replies: 4
    Last Post: 02-16-2007, 07:41 AM
  4. easy solution, just cant remember how to
    By foamcows in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2006, 01:18 PM
  5. Quick and easy solution needed!
    By grahamhurlburt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-24-2005, 12:43 AM
  6. Easy solution need for find problem
    By Neil Atkinson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2005, 10:05 PM
  7. Macro Help, should be an easy solution
    By rugby199993 in forum Excel General
    Replies: 2
    Last Post: 07-01-2005, 08:50 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