+ Reply to Thread
Results 1 to 3 of 3

Excel 2010 Transposing records with many rows into a single row

Hybrid View

  1. #1
    Registered User
    Join Date
    03-30-2012
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    1

    Talking Excel 2010 Transposing records with many rows into a single row

    Hi everyone,

    Running Excel 2010:

    I have to transpose a single column report with 11 fields one on top of the other for each record to a single row with a column for each field.

    E.G.

    From:
    [Column1]
    [Field 1]
    [Field 2]
    [Field 3]
    [Field 4]

    To:
    [Column 1][Column 2][Column 3][Column 4]
    [Row 1]

    Any thoughts how this can be done, as the transpose only allows me to copy one record at a time?

    Many thanks in advance.

  2. #2
    Valued Forum Contributor
    Join Date
    03-14-2012
    Location
    Arizona USA
    MS-Off Ver
    Excel 2000/2007
    Posts
    408

    Re: Excel 2010 Transposing records with many rows into a single row

    Copy:Paste Special>Transpose

    It works on complete tables. I tested it in 2000 and 2007.

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Excel 2010 Transposing records with many rows into a single row

    Hi Serenity, welcome to the forum.

    If I understand correctly, you have a "record" in cells A1:A11, then a second "record" in A12:A22, a third in A23:A33, etc. down column A, and you want to transpose each of the 11 rows into one row using 11 columns. For example, A1:A11 would transpose into B1:L1. A12:A22 would transpose into B2:L2. So you end up with a table that is 11 columns wide and some amount of rows long?

    If that's the case, try this macro. It organizes the data as I stated, and then deletes the original column A so you're only left with the final table.
    Sub movedata()
    Dim i As Long, j As Long, lastrow As Long
    lastrow = Range("A" & Rows.Count).End(xlUp).Row
    j = 1
    
    For i = 1 To lastrow Step 11
        Range("A" & i & ":A" & i + 10).Copy
        Range("B" & j).PasteSpecial Transpose:=True
        j = j + 1
    Next i
    Range("A:A").EntireColumn.Delete
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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