+ Reply to Thread
Results 1 to 4 of 4

Consolidate Names/Department into 2 Columns

  1. #1
    Registered User
    Join Date
    02-21-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    2

    Consolidate Names/Department into 2 Columns

    I have a workbook that is periodically updated containing department codes followed by a list of names assigned to the department.

    The department codes are in Row 1 & Row 21 spanning columns A:G.

    A2:G19 contains the names under the department codes in Row 1

    A22:D39 contains the names under department codes in Row 21.

    The desired output is in a Table in I1:J159.

    I can't, for the life of me, figure out a good way to automate the output illustrated in the table.

    Any help is greatly appreciated!
    Attached Files Attached Files
    Last edited by AliGW; 02-24-2020 at 02:13 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Consolidate Names/Department into 2 Columns

    Welcome to the forum.

    Here's a simple solution using PowerQuery:

    1. Load each of the source tables into PQ (uncheck My table has headers in each case). Transpose and then unpivot all but the first column, then delete the middle column. Close and load to connection.
    2. Create an append query from the two tables - relabel the column headers, sort and then close and load to your desired position.

    If the source tables change, just refresh all queries (Data ribbon).
    Attached Files Attached Files
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-21-2020
    Location
    USA
    MS-Off Ver
    365
    Posts
    2

    Re: Consolidate Names/Department into 2 Columns

    Thank you so much!

    That is exactly what I needed!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Consolidate Names/Department into 2 Columns

    No problem.

+ 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. Replies: 3
    Last Post: 09-19-2018, 07:01 PM
  2. Replies: 2
    Last Post: 09-19-2017, 03:56 PM
  3. How can I consolidate rows with same names but sum up only certain columns?
    By bottledwater in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-14-2016, 05:36 PM
  4. Trying to consolidate a list of names to another worksheet
    By NorthernRedwood in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-25-2015, 08:46 PM
  5. CONSOLIDATE-SORT by Name/Department/Job#/Hours
    By Mr.Nohelp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-16-2014, 03:24 PM
  6. Macro to unhighlight the colored cells based on Activities and Department names
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-02-2014, 06:35 AM
  7. Vba code to display the department names on diff labels
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2009, 11:23 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