Rows.Count is a built-in constant that tells VBA how many rows there are ina worksheet.Originally Posted by pdeshazier
This is then used as a start point in the deterimination
Cells(Rows.Count,"A")
effectively starts at the last row in column A.
It then works its way up until the last non-empty cell (that is the first one it meets on the way up)
.End(xlUp)
and returns the row number
.Row
which it uses then on.
An alternative way is to look down for the row before the first empty cell
Range("A1").End(xlDown).Row
I prefer the former method in case there are any blank lines. Consider this scenario
A1: Value 1
A2: Value 2
A3: blank
A4: Value 3
the xlUp method returns 2. the xlDown methid returns 2, so Value 3 would not get processed.