+ Reply to Thread
Results 1 to 8 of 8

Transpose Columns To Rows (with Variable Columns)

  1. #1
    Registered User
    Join Date
    06-26-2011
    Location
    Naples, Italy
    MS-Off Ver
    Excel 2007
    Posts
    1

    Exclamation Transpose Columns To Rows (with Variable Columns)

    Hi All
    I've a pretty challenging work to do, I am trying to use the TRANSPOSE funcion to transpose rows/columns, till now, with no luck.

    Because the required columns to output are not fixed, this approach doesn't get the point...

    Please, see the attached file for an example:

    EXAMPLE.xls

    Example.jpg


    Any suggestion will be very very well accepted...

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transpose Columns To Rows (with Variable Columns)

    Based on you removing the blank row at the top so your table sits at A1, and remove all the other stuff except the data... try this:

    Please Login or Register  to view this content.

    The macro operates on the assumption that the 1-3 matching rows per code will be together in the list, as shown in your example.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-25-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Transpose Columns To Rows (with Variable Columns)

    Hi

    Your solution is really good but can it be modified if you have data with more than 3 rows per code. I have a similar problem but my data contains up to 40 rows per code and 5000 codes.

    Thanks
    EE
    Last edited by Excel Eejit; 07-09-2011 at 04:01 AM. Reason: SOLVED

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transpose Columns To Rows (with Variable Columns)

    Sounds horrific. A more complete sample data set / example results would probably be in order.

  5. #5
    Registered User
    Join Date
    01-25-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Transpose Columns To Rows (with Variable Columns)

    Hi

    Please find attached a sample of my data and how I need it arranged. My end goal is that I have one cell of notes per member.

    I have tried to use pivot tables and IF functions but I don't know enough about excel to do what I need.

    Any help would be great.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transpose Columns To Rows (with Variable Columns)

    Is the data really already sorted that way? And it would be better to just put all the "strings" for a single case into a single cell, yes? Try this...
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-25-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Transpose Columns To Rows (with Variable Columns)

    Thank you thank you thank you - you are a god!!

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Transpose Columns To Rows (with Variable Columns)

    You should use the F8 key in the VBeditor to step through that code one line at a time and see what it's doing on the sheet. Everything I did I did mostly with standard formulas, then just pasted the results to a new sheet.

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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