+ Reply to Thread
Results 1 to 2 of 2

Merge Rows But Move Unique Values To New Column

  1. #1
    Registered User
    Join Date
    01-08-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2016
    Posts
    22

    Lightbulb Merge Rows But Move Unique Values To New Column

    Hi Wonderful People,

    I have a conudrum and hoping someone can shed some light to help.

    I have a file with around 20k rows of account data however for some reason the rows are duplicated because of package service and it looks like this:

    Account Name --------- Join Date ----------- Other Columns ------------ Package
    Account 1 -------------- 1/1/19 -------------- Data ----------------------- Main Package
    Account 1 -------------- 1/1/19 -------------- Data ----------------------- Bolt On
    Account 1 -------------- 1/1/19 -------------- Data ----------------------- Add on
    Account 2 -------------- 1/1/18 -------------- Data ----------------------- Main Package
    Account 3 -------------- 1/1/17 -------------- Data ----------------------- Main Package
    Account 3 -------------- 1/1/17 -------------- Data ----------------------- Add on
    Account 4 -------------- 1/1/19 -------------- Data ----------------------- Main Package

    Is it possible in Excel using some type of INDEX or something where I can create a new tab where there is just one row for each account name then it looks up that column for the Package column and adds the first value then if there are additional matches it puts it in the next column?

    So it would look like this:
    Account Name --------- Join Date ----------- Other Columns ------------ Main Package ----- Extra Item --- Extra Item
    Account 1 -------------- 1/1/19 -------------- Data ----------------------- Main Package ----- Bolt On ------- Add On
    Account 2 -------------- 1/1/18 -------------- Data ----------------------- Main Package
    Account 3 -------------- 1/1/17 -------------- Data ----------------------- Main Package ----- Add On
    Account 4 -------------- 1/1/19 -------------- Data ----------------------- Main Package

    Is this doable? As you can see I dont need them to organize the columns based on package type I just need this column to move into the row so I only have 1 row for each account.

    Thanks for any help you can provide!

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Merge Rows But Move Unique Values To New Column

    This proposal employs a helper column (E) which may be moved and/or hidden for aesthetic purposes and which is populated using: =COUNTIFS(A$2:A2,A2)
    The Name:Main columns (light green) are populated using: =IFERROR(INDEX(A$2:A$8,AGGREGATE(15,6,(ROW($A$2:$A$8)-ROW($A$1))/($E$2:$E$8=1),ROWS($A$1:$A1))),"")
    The Extra columns (darker green) are populated using: =IFERROR(INDEX($D$2:$D$8,AGGREGATE(15,6,(ROW($A$2:$A$8)-ROW($A$1))/($A$2:$A$8=$F2)/($E$2:$E$8=COLUMNS($A$1:B$1)),1)),"")
    You will usually get faster responses if you utilize the instructions in the banner at the top of the page.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Merge files and check column contains correct data vlookup to move out rows
    By waffleboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2020, 12:25 PM
  2. merge unique column values
    By max_max in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-07-2019, 03:03 PM
  3. Replies: 3
    Last Post: 12-21-2016, 12:14 PM
  4. [SOLVED] vba split data as per column unique values and move to exact workbook into sht(opencall)
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2014, 11:29 PM
  5. Merge Duplicate Rows unique values into single rows for an infinite amount of columns/rows
    By aimeecrystalaid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2013, 08:43 PM
  6. Move data in rows to columns based on unique ID in column A
    By ssdsibes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-04-2013, 07:04 AM
  7. Merge rows according to unique IDs in column A- with multiple columns
    By inbars in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-26-2013, 08:03 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