+ Reply to Thread
Results 1 to 6 of 6

Transpose a table

  1. #1
    Registered User
    Join Date
    09-15-2014
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    3

    Transpose a table

    Dear all,
    currently I'm trying to transpose data from columns to rows. My problem is as follow: After every 40 rows in the original data sheet a new column has to be build:
    Original structure of the table:

    Group Question Answer

    Group 1 Question 1 Answer 1
    Group 1 Question 2 Answer 2
    Group 1 Question 3 Answer 3
    Group 1 Question 4 Answer 4
    Group 1 ...
    Group 1 Question 40 Answer 40
    Group 2 Question 1 Answer 1
    Group 2 Question 2 Answer 2
    Group 2 Question 3 Answer 3
    Group 2 Question 4 Answer 4
    Group 2 ...
    Group 2 Question 40 Answer 40

    The structure I prefer and taht needs to be build just consists of one row for each of the groups.

    Group 1 Answer 1 Answer 2 .... Answer 40
    Group 2 Answer 2 Answer2 .... Answer 40

    I would like to know, if it is possible to build a macro that creates a new row in the new data sheet after 40 rows in the original data sheet. Otherwise I have to transpose the table for each group which is impossoible since there are thousands of those groups.

    Thanks a lot in advance!

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    12,305

    Re: Transpose a table

    You could do that with formulas. Can you post a sample workbook showing the actual layout and location of your data?
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    09-15-2014
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    3

    Re: Transpose a table

    I'm sorry. The data is confidental but the layout is like the one above. Did that become clear or do you have any questions about that.
    Unfortunately, I don't really know how to solve the problem with formulas. Do you have a specific formula in mind?
    Thanks a lot in advance!!

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    12,305

    Re: Transpose a table

    Here's an example.
    Attached Files Attached Files
    Last edited by romperstomper; 09-15-2014 at 09:34 AM.

  5. #5
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: Transpose a table

    Try the attached file and tell if that was what you were trying to achieve..
    I have use Array formula ( so use CTRL + SHIFT + Enter )
    Attached Files Attached Files
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Transpose a table

    Assuming there are ALWAYS 40 questions/answers for each group
    here's a VBA solution:

    Please Login or Register  to view this content.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  7. #7
    Registered User
    Join Date
    09-15-2014
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    3

    Re: Transpose a table

    Thank you all a lot! You solved the problem. Sorry for thanking you so late. I finally applied your formula, Romperstomper. Until now, I didn't understand how it works, but since it does, everthing is fine Except for my curiosity of course... So thanks a lot again!

+ 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. Transpose Pivot Table
    By miekoo in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-02-2013, 04:19 AM
  2. [SOLVED] Transpose a table's first row into an array
    By jimmalk in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-23-2012, 05:33 AM
  3. How to ROTATE a table (not transpose)
    By Samsung2010 in forum Excel General
    Replies: 3
    Last Post: 11-16-2010, 09:16 AM
  4. Transpose 2 dim. table into vector
    By ElmerS in forum Excel General
    Replies: 6
    Last Post: 10-24-2009, 06:09 PM
  5. [SOLVED] transpose a table
    By SuzyQ in forum Excel General
    Replies: 2
    Last Post: 11-02-2005, 06:17 PM

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