goto last cell with data

  • Thread starter Thread starter W
  • Start date Start date
W

W

Hi all,

I export a query from Access on which I have to perform statistical analysis.
The data always start at cell A2, but can stop at whatever cell in the A
range. E.g. it could be A345 or A21.

How can I, programmatically, position myself on A2 and then select from A2
till the last "filled" cell, e.g. A345 ?

Thank you,

W
 
Sub dural()
n = Cells(Rows.Count, "A").End(xlUp).Row
Range("A2:A" & n).Select
End Sub
 

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