Code to select data
Sub anita()
Dim r As Range, nLastRow As Long
Set r = ActiveSheet.UsedRange
nLastRow = r.Rows.Count + r.Row - 1
Rows("2:" & nLastRow).Select
End Sub
--
Gary''s Student - gsnu201001
"Anita" wrote:
Hi - I am using v2007 and want to know code for selecting from row 2 to the
end of populated data in a spreadsheet. The length of the data will vary
everytime. Any help gratefully nreceived. Thanks. Anita
|