moving ranges thru workbook

  • Thread starter Thread starter Radomir
  • Start date Start date
R

Radomir

Please
I can not move ranges located on separate sheets and
gather them into one big range. On 7 sheets I have
ranges: "monday", "tuesday" etc. Each range has the same #
of columns only number of rows is a variable. How to
collect all the data into one big range "week" located on
separate sheet of course. It seemed to be easy for me.
Thans Radomir
 
This macro should do what you want. As written, this macro takes all the
data from Column A to Column J and as many rows as Column A has occupied,
from every sheet in the file (except "Weeks") and copies it to the Weeks
sheet. HTH Otto
Sub CopyData()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name = "Week" Then GoTo Nextws
With Sheets(ws.Name)
.Range("A1", .Range("A" & Rows.Count).End(xlUp).Offset(,
10)).Copy _
Range("A" & Rows.Count).End(xlUp).Offset(1)
End With
Nextws:
Next ws
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top