+ Reply to Thread
Results 1 to 17 of 17

Transposing Rows to Columns 1-12, 13-24,25-36 etc

  1. #1
    Registered User
    Join Date
    03-04-2017
    Location
    leicester,uk
    MS-Off Ver
    office 2013
    Posts
    8

    Transposing Rows to Columns 1-12, 13-24,25-36 etc

    I have imported a text file into column 1.

    How do I transpose rows 1-12 to columns then 13-24 to the same columns then 25-36 etc.

    Basically Convert the first 12 rows to columns then the next 12 to the same columns and continue the same down to row 600.

  2. #2
    Registered User
    Join Date
    03-04-2017
    Location
    leicester,uk
    MS-Off Ver
    office 2013
    Posts
    8

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    If I use the automatic transpose function for every row then I get a new column for every row.

  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,737

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    So your data is all in column A and you want it so that A1:A12 goes into C1:N1, then A13:A24 goes into C2:N2, and so on?

    Pete

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

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    If that is the case then you can put this formula in C1:

    =INDEX($A:$A,(ROWS($1:1)-1)*12+COLUMNS($C:C))

    copy it across to N1, then copy C1:N1 down as far as you need to.

    Hope this helps.

    Pete

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    One way...

    =OFFSET($A$1,MOD((COLUMNS($A:A)-1),12),INT((ROWS($1:1)-1)),,)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  6. #6
    Registered User
    Join Date
    03-04-2017
    Location
    leicester,uk
    MS-Off Ver
    office 2013
    Posts
    8

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    Thanks Glenn for the spreadsheet

    Its great but not exactly what I need, you have numbers 1-36 in columns a,b,c

    I may of not described properly every row is in column A not 1.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    .
    .
    .
    35
    36

    I need to convert to

    1 2 3 4 5 6 7 8 9 10 11 12
    13 14 15 16 17 18 19 20 21 22 23 24
    25 26 27 28 29 30 31 32 33 34 35 36

    as per your spreadsheet

  7. #7
    Banned User!
    Join Date
    10-29-2012
    Location
    Europe
    MS-Off Ver
    2013, 2016
    Posts
    318

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    @Glenn,

    All the date are in column A. Not in column A,B, and C.

  8. #8
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    Another way ...

    =OFFSET($A$1,COLUMNS($A:A)-1+ROWS($1:1)*12-12,INT((ROWS($1:1-1))/12))

  9. #9
    Registered User
    Join Date
    03-04-2017
    Location
    leicester,uk
    MS-Off Ver
    office 2013
    Posts
    8

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    Thanks Phuocam It works Pertectly

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

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    Did you not try mine in Post #4? It does not use a volatile function.

    Pete

  11. #11
    Registered User
    Join Date
    03-04-2017
    Location
    leicester,uk
    MS-Off Ver
    office 2013
    Posts
    8

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    Sorry Pete, yours works great as well.
    The only thing that could improve both is

    If the cell is blank both formulas give a zero instead of a blank.
    If its blank and the formula gives a blank it would make it perfect.

    Thanks
    Very Much

  12. #12
    Registered User
    Join Date
    03-04-2017
    Location
    leicester,uk
    MS-Off Ver
    office 2013
    Posts
    8

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    This seems to work

    =IF(INDEX($A:$A,(ROWS($1:1)-1)*6+COLUMNS($C:C))=0,"",INDEX($A:$A,(ROWS($1:1)-1)*6+COLUMNS($C:C)))

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,985

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  14. #14
    Registered User
    Join Date
    03-04-2017
    Location
    leicester,uk
    MS-Off Ver
    office 2013
    Posts
    8

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    Thanks, AliGW I will change to solved, sorry new to the Forum today.

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

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    Quote Originally Posted by mralanb View Post
    This seems to work

    =IF(INDEX($A:$A,(ROWS($1:1)-1)*6+COLUMNS($C:C))=0,"",INDEX($A:$A,(ROWS($1:1)-1)*6+COLUMNS($C:C)))
    Zero might be a valid number to return, so it would be safer to do this:

    =IF(INDEX($A:$A,(ROWS($1:1)-1)*12+COLUMNS($C:C))="","",INDEX($A:$A,(ROWS($1:1)-1)*12+COLUMNS($C:C)))

    However, if the values that you are returning are text values, then you can do this:

    =INDEX($A:$A,(ROWS($1:1)-1)*12+COLUMNS($C:C))&""

    If you are returning numbers then you can use this Custom Format:

    General;-General;;

    There are many ways to do things in Excel.

    Hope this helps.

    Pete

  16. #16
    Registered User
    Join Date
    03-04-2017
    Location
    leicester,uk
    MS-Off Ver
    office 2013
    Posts
    8

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    Thanks Again

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

    Re: Transposing Rows to Columns 1-12, 13-24,25-36 etc

    You're welcome - thanks for the rep.

    Pete

+ 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. Need help transposing rows into columns
    By mckeven in forum Excel General
    Replies: 4
    Last Post: 10-08-2014, 04:41 PM
  2. [SOLVED] Transposing 2 - 70,000+ long columns into approx 4600 rows with 15 columns each
    By Glennstapo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2014, 09:51 AM
  3. Transposing records from rows to columns
    By Subtone in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-08-2013, 07:42 AM
  4. [SOLVED] Need help with transposing columns to rows
    By cheryl_granieri in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2013, 09:14 AM
  5. Replies: 8
    Last Post: 11-02-2011, 02:45 PM
  6. Transposing columns to rows
    By sunitagadapu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2009, 08:54 AM
  7. Transposing columns and rows
    By TEB2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2005, 01:06 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