My loop is not finishing all the way and keeps stopping a few columns down. I'm not experienced at this, so it's hard to figure it out.
It is Macro 9 that I am using btw.
My loop is not finishing all the way and keeps stopping a few columns down. I'm not experienced at this, so it's hard to figure it out.
It is Macro 9 that I am using btw.
What Exactly are you wanting to do?
Thanks,
Mike
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
Select Thread Tools-> Mark thread as Solved.
This is a loop of a recorded macro. If you run the macro with a different cell selected, different things will happen.
You need to post what you are doing.
I am cutting all all rows from 101-the end and pasting them in the open cell in row 1 until there are no more rows past 100 in the entire worksheet. I am trying to unstack the data to where all of the headers are in row 1 instead of stacked the way they are. The data used to be in 4 columns btw.
Looking at you sample worksheet Im still confused?in the sample data goes to column BH. Can you upload a Sample of the data in its original format, and on sheet 2 show how you would like it to look.The data used to be in 4 columns btw.
The original is on sheet 2
Try this,
With the original data in sheet 2 of the second sample, select A1 and run the code, with the earlier sample, select BE1 and run it.
![]()
Sub move_data() Application.ScreenUpdating = False Dim rng As Range, ctr As Long Set rng = Intersect(ActiveSheet.UsedRange, ActiveCell.Resize(1, 4).EntireColumn) ctr = 1 Do Until rng.Rows.Count - (ctr * 100) < 0 Range(rng((ctr * 100) + 1, 1), rng((ctr * 100) + 100, 4)).Cut rng.Offset(, ctr * 4) ctr = ctr + 1 Loop Application.ScreenUpdating = True End Sub
Last edited by jason.b75; 08-14-2012 at 10:41 AM.
Is there any way I can change the loop I have in place so that it will work? I'm trying to use the recorded macro so I can use a similar loop for other data without having to know how to actually write code. Lazy, I know, but I don't have the time unfortunately.
---------- Post added at 09:48 AM ---------- Previous post was at 09:42 AM ----------
Nevermind, this works awesome. Thanks a bunch, I appreciate it.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks