Dim
ws
As
Worksheet
Dim
wsTarget
As
Worksheet
Dim
rngSource
As
Range
Dim
i
As
Integer
Dim
lr
As
Long
, lrTarget
As
Long
, col
As
Long
Set
wsTarget = Sheets(
"11"
)
For
i = 3
To
9
Set
ws = Sheets(i)
lrTarget = wsTarget.Cells(Rows.Count, 1).
End
(xlUp).Row
With
ws
lr = .Cells(Rows.Count, 1).
End
(xlUp).Row
col = .Cells(17, Columns.Count).
End
(xlToLeft).Column
If
lr >= 17
Then
Set
rngSource = .Range(.Cells(17, 1), .Cells(lr, col))
rngSource.Copy Destination:=wsTarget.Cells(lrTarget + 1, 1)
End
If
End
With
Next
i
End
Sub