transposing one column into rows 52 columns wide

homejames

New Member
Joined
Jan 13, 2015
Messages
2
Hi

I have answers to a survey from about 140 people listed in one column. The survey is 52 questions long.
I need to transpose the data, so the first 52 rows in the column are transposed into one row 52 columns long, and then the next 52 rows are transposed into the row below the first transposed row as a 52 column row and so on until all the data is so arranged.

the data starts in H1 to H7280.

to use an example with 3 items per survey it would be:
A
B
C
D
E
F
G
H
I

to

ABC
DEF
GHI
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Try this:

=OFFSET($H$1,COLUMN()-COLUMN($G1)+((ROW()-ROW(G$1))*52),0)

Assuming you want your transpose to start in column G. You just need to copy that over for 52 columns.
 
Upvote 0
So ive just realised i must still be asleep. G comes before H...DOH! Swap the G for I


=OFFSET($H$1,COLUMN()-COLUMN($I1)+((ROW()-ROW(I$1))*52),0)

 
Upvote 0
Hi there,

Give this a go on a COPY of your workbook.

It should transpose the data in column H (each 52 rows) and put the data in Columns I to BH (52 columns)

Might be an easier way of writing the code but it should do what you want.

Code:
Sub transpose52()
Dim i As Long, x As Long
    With ActiveSheet
        x = 1
            For i = 1 To 7280
                Cells(x, 9).Resize(, 52) = WorksheetFunction.Transpose(Cells(i, 8).Resize(52))
                x = x + 1
                i = i + 51
            Next i
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top