soft-coding lines in a macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to get a macro to find the last line of data (Ctrl+Shift+Down)
and then go down one line...this keystroking hard-codes the line i have
selected but I need it to be able to run without doing so. Any thoughts?
 
Range("A" & Rows.Count).End(xlUp).Offset(1,0).Select

Change the "A" to a suitable column reference.

This works if there are gaps in the data. If there aren't:

Range("A1").End(xlDown).Offset(1,0).Select

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