Finding first available row - which is better?
Posted on 2011-10-17
Which would be a best practice? Or does it just depend on one's knowledge of the data in the sheet?
dim rng as Range
set rng = Range("A" & Rows.Count).end(xlUp).Offset(1,0)
set rng = Range("A" & cells.Find(what:="*",SearchDirection:=xlPrevious).Offset(1,0).Row)
Certainly, with the second, (assuming there was any data in the ActiveSheet) you'd be assured you really got the first entirely blank row. Is there any reason one may not want to just revert to the .Find approach as superior in all cases?