Hi. I'm having a toughs time with what I thought was a simple task. I need to cut and insert/paste a range of cells and then repeat in a loop.
Explicitly, I have 3 columns with 2990 rows. Every 46 rows is a 'group' and I want to cut each group and paste at the top of the sheet so I have only 46 rows and (2990/46*3) 195 columns. I need to preserve the order so that the group at the bottom becomes the rightmost group.
More simply, I have
xxx
xxx
xxx
yyy
yyy
yyy
zzz
zzz
zzz
and I want
xxx yyy zzz
xxx yyy zzz
xxx yyy zzz
From searching around, I tried to write a simple code but obviously I'm not handling the variables right, but you get the idea.
Thanks for any help.Sub ci() For j = 2945 To 47 Step -46 Range(Cells(1, j), Cells(3, j + 45)).Select Selection.Cut Range("A4").Select Selection.insert Shift:=xlRight Next j End Sub
Bookmarks