Simple Macro IMO

  • Thread starter Thread starter Pitbull
  • Start date Start date
P

Pitbull

Hello all, just trying to copy a range after the last used
cell in a worksheet.

I use the recording macro to do it.

Stuck after this step.:

Selection.End(xlDown).Select
(Now, I need it to go down 1 more row)... but if I do it
with the keyboard, it just says, range select (a specific
cell)
What is the command to say, down one more row please?

Tx

Pitbull
 
Pit

Sub findbottom()
Range("A1:M1").copy destination:= _
ActiveSheet.Cells(Rows.Count, ActiveCell.Column).End(xlUp) _
.Offset(1, 0)
End Sub

Note: the code goes to bottom of column then comes back up to last used cell
in the column. Then the Offset(1,0) drops down one cell.

Better to work up this way than down from the top.

Eliminates the problem of a blank cell in mid-range or if deleting rows you
must work up from the bottom.

Also note: no need to "select"

Gord Dibben Excel MVP
 
Hello Pitbull
Try
activecell.offset(1,0).range("a1").select

HTH
Mark(InWales)
 

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