Copy parts of a data range into a new spreadsheet
you wrote: "Thanks for the help. Just one question. This works great as is.
But when I tried to use the code to add the new worksheets after, it didn't
work."
I'm not sure what you meant by "add the new worksheets after" - after what?
As originally written it places each new sheet right behind the sheet that
is selected at the time the code is run.
If you'd like to add all sheets to the end of the workbook, then replace the
line that reads
Worksheets.Add after:=sourceWS
with
Worksheets.Add after:=Worksheets(Worksheets.Count)
Note that I see I made a typo in the initial code in the example, leaving
out the "s" needed right in front of the ( in the statement. My apologies
for the typo.
"forest8" wrote:
"forest8" wrote:
A have a spreadsheet with about 1000 lines of data. I want to copy the first
50 rows into a new spreadsheet. The data starts in A5. The last column of
data is in K.
Here's the problem. I need to first insert the spreadsheet to the right of
the data worksheet. Then I want to copy the first 50 rows.
I also want it to continuing inserting worksheets and copying data until the
original spreadsheet no longer has data to copy., e.g. rows a5:a54,a55:a104,
etc.
Thanks
|