Transpose Vertical to Horizontal in range

Hi, I need to transpose data multiple times from row to colum for each set of 26 items.

The following code works for one set, but I need to set this for all other following sets.

Sub Transpose()

Dim rng As Range

Dim i As Long

Dim j As Long 

Set rng = Cells (Rows.Count, 26) . End(xlUp)

j = 1 

For i = 1 To rng.Row Step 26

Cells(j, "J") . Resize(6, 26). Value = _

Application.Transpose(Cells(i, "B"). Resize (26, 6))

j = j + 1

Next i 

End Sub

Thanks in advance!

May 22nd, 2015 12:39pm

When you write 6 rows of data, why then increment j only by 1? .-)

Andreas.

Free Windows Admin Tool Kit Click here and download it now
May 23rd, 2015 3:14am

Hi,

This is the forum to discuss questions and feedback for Microsoft Excel, you issue is related to Excel DEV, I recommend you post the question to the MSDN forum for Excel

http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

George Zhao
TechNet Community Support

May 25th, 2015 9:33pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics