+ Reply to Thread
Results 1 to 5 of 5

Need help transposing rows into columns

  1. #1
    Registered User
    Join Date
    10-08-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Need help transposing rows into columns

    I've searched the net for the life of me, and can't seem to find what I'm looking for. Here's a basic overview of what I'm trying to accomplish:

    What I have:
    Before.png

    What I want:
    After.png


    I don't know how to word what I'm looking for, but essentially I want to transpose a range of cells, but have the first cell in the column be on the same row as each record.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need help transposing rows into columns

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well. Please don't upload pictures. None of us are inclined to recreate your workbook when you have the original.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-08-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Re: Need help transposing rows into columns

    Here's the attached workbook I took pictures of:
    Transpose Help.xlsx

    There are 2 worksheets. One is what I have, and the second is what I want.

    I'm trying to figure out how to automate this for another workbook I'm working on that has hundreds and hundreds of rows similar to this.

    Thanks

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Need help transposing rows into columns

    in G1 and copy formula down

    =COUNTA(B1:F1)

    in H1 and copy down array entered formula

    =IFERROR(INDEX($A$1:$A$4,MATCH(TRUE,MMULT(--(ROW($A$1:$A$4)>=TRANSPOSE(ROW($A$1:$A$4))),$G$1:$G$4)>=ROWS($1:1),0)),"")

    in I1 and copy down array entered formula

    =IFERROR(INDIRECT(TEXT(SMALL(IF(B$1:F$4<>"",ROW(B$1:F$4)*10^4+COLUMN(B$1:F$4)),ROWS(I$2:I2)),"R0000C0000"),0),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    A
    B
    C
    D
    E
    F
    G
    H
    I
    1
    Test 1 A B C D
    4
    Test 1
    A
    2
    Test 2 A B
    2
    Test 1
    B
    3
    Test 3 E F G H I
    5
    Test 1
    C
    4
    Test 4
    4
    5
    6
    3
    Test 1
    D
    5
    Test 2
    A
    6
    Test 2
    B
    7
    Test 3
    E
    8
    Test 3
    F
    9
    Test 3
    G
    10
    Test 3
    H
    11
    Test 3
    I
    12
    Test 4
    4
    13
    Test 4
    5
    14
    Test 4
    6
    Attached Files Attached Files
    Last edited by AlKey; 10-08-2014 at 04:00 PM. Reason: Added Excel File
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    10-08-2014
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Re: Need help transposing rows into columns

    This worked perfectly!!!

    Many thanks!

+ 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 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
  2. [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
  3. Replies: 8
    Last Post: 11-02-2011, 02:45 PM
  4. Transposing columns to rows
    By sunitagadapu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2009, 08:54 AM
  5. 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