+ Reply to Thread
Results 1 to 2 of 2

Transpose cells from a row into 1 column inserting a row

  1. #1
    Registered User
    Join Date
    05-14-2020
    Location
    Miami, FL
    MS-Off Ver
    Excel2016
    Posts
    1

    Transpose cells from a row into 1 column inserting a row

    All,
    I have a thousand rows with data like so:
    SOURCE DATA
    Col 1 | Col 2 | Col 3 | Col4
    Person 1| Book1|Book2|Book3
    Person 2| Book1|Book2|
    Person 3| Book1|Book2|Book3| Book4

    I need to reorganize this data to transpose part of data (column 2 onwards) from rows into columns inserting the transposed rows so it looks like:
    TARGET DATA
    Col 1 | Col 2 |
    Person 1| Book1|
    Person 1| Book2|
    Person 1| Book3|
    Person 1| Book4|
    Person 2| Book1|
    Person 2| Book2|
    Person 3| Book1|
    Person 3| Book2|
    Person 3| Book3|
    Person 3| Book4|
    The # of books per person can vary up to 8 books. So, I inserted 10 blank rows between each of the original rows. Then, copied records from each row and did a transpose paste into the blank rows I had inserted. Finally, deleted the remaining blanks.
    There has to be a better way. Can someone help?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,952

    Re: Transpose cells from a row into 1 column inserting a row

    This is a simple Unpivot exercise in Power Query. See attached file and here is the Mcode created from the steps
    Please Login or Register  to view this content.
    Review PQ
    In the attached file
    Click on any cell in the new table
    On the Data Tab, click on Queries & Connections
    In the right window, double click to open Query
    Review PQ steps
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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: 2
    Last Post: 02-25-2014, 09:13 PM
  2. Macro to transpose 10,000 sets of 4 cells in column 4 cells in 4 columns
    By Sbark in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-25-2014, 08:39 PM
  3. [SOLVED] vlookup to convert row of cells into column of cells (transpose)
    By kosherboy in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-13-2014, 06:07 PM
  4. [SOLVED] If cells in column A are duplicate would like to transpose column b
    By schweizer in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-19-2013, 12:00 PM
  5. Transpose every 5 cells in column A to indidual rows in column B
    By meridklt in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-14-2013, 12:35 AM
  6. Replies: 9
    Last Post: 07-22-2012, 12:03 PM
  7. [SOLVED] Match cells in Column A, then transpose (matching) row data from column B, C, D, etc.
    By Jahoker in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-15-2012, 10:37 AM

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