Hello Ken,
With this line of code:-
With ws.[A1].CurrentRegion
CurrentRegion refers to your dataset beginning at cell A1. This can also be written as:-
With ws.Range("A1").CurrentRegion
or
With ws.Cells(1,1).CurrentRegion
With this line of code:-
.AutoFilter 3, "Disposed"
The 3 stands for Column C, which, in this case, means the filter is placed on Column C filtering for the criteria "Disposed".
The End(3)(2) in this line of code:-
.Offset(1).EntireRow.Copy Sheet2.Range("A" & Rows.Count).End(3)(2)
are simply the enumerations for xlUp which is the (3) and offset(1) which is the (2).
It is the same as writing:
.Offset(1).EntireRow.Copy Sheet2.Range("A" & Rows.Count).End(xlUp).Offset(1,0)
or
.Offset(1).EntireRow.Copy Sheet2.Range("A" & Rows.Count).End(xlUp) (2)
So the rows are counted from the bottom of the sheet (the very last row, Column A) upwards to the last used row of data then offset one row down from the last row to avoid overwriting previous rows of data.
I hope that this helps.
Cheerio,
vcoolio.
Bookmarks