+ Reply to Thread
Results 1 to 5 of 5

TRANSPOSE OR NOT TO TRANSPOSE? How to change my table to a list format?

  1. #1
    Registered User
    Join Date
    02-15-2016
    Location
    London, UK
    MS-Off Ver
    14
    Posts
    32

    Unhappy TRANSPOSE OR NOT TO TRANSPOSE? How to change my table to a list format?

    Hello,

    I have a table with a matrix: rows showing Region, Country, Group and number of product for each country. Product and product code are in columns.
    I need to change it to a list view.

    Please see attached excel: the ORIGINAL tab shows how the data looks now and the NEW Tab how the new list view should look like.

    Please help!
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: TRANSPOSE OR NOT TO TRANSPOSE? How to change my table to a list format?

    This issue almost fits this box: https://www.excelforum.com/tips-and-...zing-data.html.

    I could not handle two headers so I removed the product code from the Original and saved the information on the Lookups sheet. This can be restored in the normal result with a VLookup.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: TRANSPOSE OR NOT TO TRANSPOSE? How to change my table to a list format?

    Using column G in the Original sheet as a helper, put zero in G3 and this formula in G4:

    =IF(COUNT(D4:F4)=0,"-",COUNT(D4:F4)+G3)

    Copy this down to give a cumulative number of records required. Then you can use these formulae in the cells stated on the NEW sheet:

    A2: =IFERROR(INDEX(ORIGINAL!A:A,MATCH(ROWS($1:1)-1,ORIGINAL!$G:$G)+1),"")

    (Copy this into B2 and C2)

    D2: =IF(C2="","",INDEX(ORIGINAL!$D$3:$F$3,MOD(ROWS($1:1)-1,3)+1))

    E2: =IF(C2="","",INDEX(ORIGINAL!$D$2:$F$2,MOD(ROWS($1:1)-1,3)+1))

    F2: =IFERROR(INDEX(ORIGINAL!$D:$F,MATCH(ROWS($1:1)-1,ORIGINAL!$G:$G)+1,MOD(ROWS($1:1)-1,3)+1),"")

    Copy these formulae down as far as you need to.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    02-15-2016
    Location
    London, UK
    MS-Off Ver
    14
    Posts
    32

    Re: TRANSPOSE OR NOT TO TRANSPOSE? How to change my table to a list format?

    Hi Pete,

    I tried to use your formula and it worked on my sample document but it did not work on my real file. Is there any count of columns that I need to be aware of if I want to paste the formula to another file? I got the number of cumulative records required but then I got only 3 records of the NEW view and the formulas kept on repeating the 3 records over and over when I pulled down the formula.

    Thanks,
    J.

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

    Re: TRANSPOSE OR NOT TO TRANSPOSE? How to change my table to a list format?

    In the attached file I added a product and modified Pete's formulas. If this doesn't help illustrate the changes that need to be made then please upload a sample that is more representative of the 'real file' so that we can attempt to modify the formulas based on the data and expected output.
    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. Replies: 11
    Last Post: 06-07-2018, 04:26 AM
  2. [SOLVED] How to convert or transpose list into table?
    By effluvium in forum Excel General
    Replies: 9
    Last Post: 03-27-2016, 05:38 AM
  3. how to change value table in column to row (transpose)
    By herukuncahyono in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-25-2015, 05:05 PM
  4. transpose column to a range calculate and transpose to new table loop
    By moshro1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2015, 10:52 AM
  5. transpose column in to table format
    By rojy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-17-2012, 03:39 AM
  6. [SOLVED] Transpose: How can I copy a list and transpose it but leaving 3 cells in between each item
    By cocolete in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-11-2012, 10:01 AM
  7. Replies: 2
    Last Post: 02-19-2007, 04:53 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