View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Archie Archie is offline
external usenet poster
 
Posts: 10
Default Selection of variable rows

great thanks

"Dana DeLouis" wrote:

How do you write in a macro to select say rows 1 to N ?


Sub Demo()
Dim n As Long
n = 5
Rows(1).Resize(n).Select
End Sub

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"Archie" wrote in message
...
I need to select a range of rows in some data which can be variable.

How do you write in a macro to select say rows 1 to N, where the N is
dependent on other factors in the macro.

possible sublimely simple?!