ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Simple Macro IMO (https://www.excelbanter.com/excel-programming/315275-simple-macro-imo.html)

Pitbull

Simple Macro IMO
 
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

Rob van Gelder[_4_]

Simple Macro IMO
 
Selection.End(xlDown).Offset(1,0).Select


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Pitbull" wrote in message
...
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




Gord Dibben

Simple Macro IMO
 
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


On Fri, 29 Oct 2004 16:53:03 -0700, "Pitbull"
wrote:

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




All times are GMT +1. The time now is 07:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com