select variable range

  • Thread starter Thread starter bob engler
  • Start date Start date
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....
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top