+ Reply to Thread
Results 1 to 7 of 7

Transposing multiple column data into rows

  1. #1
    Registered User
    Join Date
    12-17-2014
    Location
    San Jose
    MS-Off Ver
    2010
    Posts
    3

    Transposing multiple column data into rows

    Hi guys,

    First time posting, long time lurker.

    I've tried doing this through pivots and looked through a bunch of threads but I can't seem to find a solution and was hoping someone could help me out.

    I have a set of items with multiple subtypes and each subtype has specific product IDs assigned to them with percentage of sales on them.

    Product Name Subtype Name PID % of sales credit
    Product1 Subtype1 PID1 0.2
    Product1 Subtype1 PID2 0.3
    Product1 Subtype1 PID3 0.3
    Product1 Subtype2 PID4 0.1
    Product1 Subtype2 PID5 0.1
    Product 2 Subtype3 PID6 0.2
    Product 2 Subtype3 PID7 0.3
    Product 2 Subtype4 PID8 0.2
    Product 2 Subtype4 PID9 0.3
    Product3 Subtype5 PID10 0.15
    Product3 Subtype5 PID11 0.15
    Product3 Subtype5 PID12 0.2
    Product3 Subtype6 PID13 0.15
    Product3 Subtype6 PID14 0.2
    Product3 Subtype6 PID15 0.15


    I'm trying to consolidate the information a more compressed version, transposing the multiple columns into a single row for each item-subtype.

    Product Name Subtype Name PID % of sales credit PID % of sales credit PID % of sales credit
    Product 1 Subtype1 PID1 0.2 PID2 0.3 PID3 0.3
    Product1 Subtype2 PID4 0.1 PID5 0.1
    Product 2 Subtype3 PID6 0.2 PID7 0.3
    Product 2 Subtype4 PID8 0.2 PID9 0.3
    Product3 Subtype5 PID10 0.15 PID11 0.15 PID12 0.2
    Product3 Subtype6 PID13 0.15 PID14 0.2 PID15 0.15
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Transposing multiple column data into rows

    This is quite simple.

    Click on the button to run this macro:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 12-17-2014 at 09:30 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    12-17-2014
    Location
    San Jose
    MS-Off Ver
    2010
    Posts
    3

    Re: Transposing multiple column data into rows

    So I guess I solved my own issue.

    what I did was concatenate the product name and subtype labeled, NewName. Then I added a simple IF formula to each duplicate value and then concatenate that to the newly created NewName.

    Then I created a tabular table removing the totals and listing all duplicates. Given the highest number of duplicates, I added the equivalent number of repeating VLOOKUP formulas to the end of the tabular table referencing the NewName and numerical value.

    Sorry if I didn't make sense but thats how I went about solving this issue. I'll post something up later with examples to show how I did it.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transposing multiple column data into rows

    Hi Mortals,

    Welcome to the Forum!

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

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

    Re: Transposing multiple column data into rows

    The attached file shows how you can do this with formulae. Let me know if you need an explanation of how it works.

    Hope this helps.

    Pete
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-17-2014
    Location
    San Jose
    MS-Off Ver
    2010
    Posts
    3

    Re: Transposing multiple column data into rows

    Thank you all. They were all great solutions to my problem.

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Transposing multiple column data into rows

    You're welcome and thanks for the rep!

+ 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. [SOLVED] Transposing a single column to multiple rows
    By SaraLynne in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-30-2013, 09:40 AM
  2. [SOLVED] Transposing multiple rows and columns to one column
    By amoto in forum Excel General
    Replies: 3
    Last Post: 07-29-2013, 05:50 PM
  3. Transposing single column data to multiple rows
    By AudreyWalsh in forum Excel General
    Replies: 5
    Last Post: 01-02-2012, 09:09 PM
  4. Transposing column information into multiple rows
    By lgomathi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2011, 03:31 PM
  5. Transposing column into multiple rows
    By jdubbie in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-17-2010, 07:21 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