1

Newbie here and would like to get a loop working in Microsoft excel. Basically, to arrange clusters / ranges from horizontal to vertical. I have tried transpose function but have not been successful to get a code working and it seems most samples are arranging cells. hopefully someone can enlighten me with this. thanks (B2:C4), (D2:E4), (F2:G4) to be re-arrange (B2:C4), (B5:C7), (B8:C10)

enter image description here

DongM
  • 41

1 Answers1

2

you can use something like this:

Sub move_cells()
    With ActiveSheet
        .Range("d2:e4").Cut .Range("b5")
        .Range("f2:g5").Cut .Range("b8")
    End With
End Sub