+ Reply to Thread
Results 1 to 5 of 5

How do I transpose rows into columns, and on the 4th row, start a new set of columns?

  1. #1
    Registered User
    Join Date
    01-23-2015
    Location
    Irvine, California, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    How do I transpose rows into columns, and on the 4th row, start a new set of columns?

    I wish I could have someone here in person because I don't know if this question will make sense in writing, but how do I transpose rows into columns, and on the 4th row down, start a new set of columns to transpose?

    For example, I have a veryyyyy long list that looks like this:

    Column 1
    Name 1
    Address 1a
    Address 1b
    Type 1
    Name 2
    Address 2a
    Address 2b
    Type 2
    Name 3
    Address 3a
    Address 3b
    Type 3
    Name 4
    Address 4a
    Address 4b
    Type 4
    Name 5
    Address 5a
    Address 5b
    Type 5


    I want to transform it to look like this:

    Column1 Column 2 Column 3 Column 4
    Name 1 Address 1a Address 1b Type 1
    Name 2 Address 2a Address 2b Type 2
    Name 3 Address 3a Address 3b Type 3
    Name 4 Address 4a Address 4b Type 4
    Name 5 Address 5a Address 5b Type 5

    I know this is a long shot, but is there anyone out there who knows if there's even a formula to sort my data this way? Thank you!

    Best,
    Janice

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How do I transpose rows into columns, and on the 4th row, start a new set of columns?

    With your data in Column G beginning with row 1

    In A1 copied to D1 and down

    =INDEX($G:$G, (ROWS($A$1:A1)-1)*4+COLUMNS($A$1:A$1))
    See attachment
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    01-23-2015
    Location
    Irvine, California, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How do I transpose rows into columns, and on the 4th row, start a new set of columns?

    OH MY GOODNESS THAT WORKED PERFECTLY. Thank you so much!!!!

  4. #4
    Registered User
    Join Date
    01-23-2015
    Location
    Irvine, California, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: How do I transpose rows into columns, and on the 4th row, start a new set of columns?

    ChemistB,

    Would you be able to explain to me what the formula means? I want to try and understand this. How what does the ($G:$G), and then the $A and $1 mean, opposed to $A1? Also, what is the purpose of "-1" and "*4" (which I'm assuming has to do with the four columns I needed to separate my data into.)

    Time permitting, would you be able to educate me on the meaning of this formula, please? If not, I completely understand, and still really appreciate your help.

    Thank you so much!

    Janice

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: How do I transpose rows into columns, and on the 4th row, start a new set of columns?

    =INDEX($G:$G, (ROWS($A$1:A1)-1)*4+COLUMNS($A$1:A$1))

    Okay the $ lock either a column (if you place it before a letter), or row (if you place it in front of the number) or both (if placed in front of both)


    So COLUMNS($A$1:A$1) counts the number of columns in the range A1:A1 which is 1. As that gets dragged to the right, it becomes $A$1:B$1, $A$1:C$1, etc. which equals 2, 3, etc.
    So the columns part will equal 1,2,3,or 4 depending on which column your formula is in.
    We then want the other part (related to ROWS) to equal 0 on the first row (0+1, 0+2, 0+3, 0+4), 4 in the second row (4+1, 4+2, 4+3, 4+4), 8 in the third (8+1, 8+2, 8+3, 8+4) and so on.
    So, to fit the equation into that sort of series, I chose ROWS($A$1:A1)-1)*4 which by row = (1-1)*4 = 0, (2-1)*4 = 4, (3-1)*4 = 8 and so on.

    I hope that helps.

+ 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] Formula to transpose rows to new columns and columns to new rows in Excel
    By bjnockle in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-26-2014, 06:28 PM
  2. [SOLVED] Transpose every 7 rows to columns
    By Latha Mani in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2014, 03:55 AM
  3. Replies: 2
    Last Post: 01-10-2014, 09:30 PM
  4. Transpose Columns To Rows (with Variable Columns)
    By G.HendriX in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-08-2011, 08:40 PM
  5. Transpose columns into rows
    By justforgroups in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-03-2011, 05:38 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