dj44
07-26-2018, 08:55 AM
Good day folks,
now my list of transpositons is growing
i was thinking to use something to make it shorter
not the most elegant of solutions
Every 30 rows i transpose
Sub Transpose_Lists()
'Transpose Lists
Dim oWs As Worksheet
Set oWs = ThisWorkbook.Worksheets("Transpose")
'1-30
oWs.Range("B2:B31").Select
oWs.Range("D2") = Join(Application.Transpose(Selection))
'31-60
oWs.Range("B32:B61").Select
oWs.Range("D4") = Join(Application.Transpose(Selection))
'62 -91
oWs.Range("B62:B91").Select
oWs.Range("D6") = Join(Application.Transpose(Selection))
'92 -120
oWs.Range("B92:B120").Select
oWs.Range("D8") = Join(Application.Transpose(Selection))
oWs.Range("B121:B150").Select
oWs.Range("D10") = Join(Application.Transpose(Selection))
' and growing
End Sub
I once had something similar but i cant work out where to put a loop.
thank you for any ideas
now my list of transpositons is growing
i was thinking to use something to make it shorter
not the most elegant of solutions
Every 30 rows i transpose
Sub Transpose_Lists()
'Transpose Lists
Dim oWs As Worksheet
Set oWs = ThisWorkbook.Worksheets("Transpose")
'1-30
oWs.Range("B2:B31").Select
oWs.Range("D2") = Join(Application.Transpose(Selection))
'31-60
oWs.Range("B32:B61").Select
oWs.Range("D4") = Join(Application.Transpose(Selection))
'62 -91
oWs.Range("B62:B91").Select
oWs.Range("D6") = Join(Application.Transpose(Selection))
'92 -120
oWs.Range("B92:B120").Select
oWs.Range("D8") = Join(Application.Transpose(Selection))
oWs.Range("B121:B150").Select
oWs.Range("D10") = Join(Application.Transpose(Selection))
' and growing
End Sub
I once had something similar but i cant work out where to put a loop.
thank you for any ideas