select variable range

B

bob engler

I am trying to select a range in WS that will always start at
A3 to I3 and will have variable amount of rows each day. I
was trying to use xlDown but can't get the selection right. I
want to sleect the range and then copy it to another sheet.

Thnaks....
 
T

Trevor Shuttleworth

one way (well, two ways):

Sub Test1()
' no gaps in column A
Range("A3:I" & Range("A3").End(xlDown).Row).Select
End Sub

Sub Test2()
' gaps in column A
Range("A3:I" & Range("A65536").End(xlUp).Row).Select
End Sub

Regards

Trevor
 
B

bob engler

Many thanks...


Trevor Shuttleworth said:
one way (well, two ways):

Sub Test1()
' no gaps in column A
Range("A3:I" & Range("A3").End(xlDown).Row).Select
End Sub

Sub Test2()
' gaps in column A
Range("A3:I" & Range("A65536").End(xlUp).Row).Select
End Sub

Regards

Trevor
 
Top