View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Pete McCOsh Pete McCOsh is offline
external usenet poster
 
Posts: 64
Default Select last cell in range

Paul,

the problem here is that the OFFSET needs to be based on a
Range object. Despite it's sugestive name, Cell isn't one,
although it's entirely possible that it was an Object
variable in the earlier code you had.

Once you get to the bottom of the region, you can use:

ActiveCell.Offset(1,0).Select

Alternatively, you can combine the two into:

ActiveCell.End(xlDown).Offset(1,0).Select

However, this method can be susceptible to errors caused
by unexpected breaks or blanks in your data, so it's often
best to work from the bottom up:

Range("A65536").End(xlUp).Offset(1,0).Select

Cheers, Pete.

-----Original Message-----
I can't remember how I did this last time.....
I've got a range of cells and I need to go to the last

cell to paste in
a load of new data.
I can use Selection.End(xlDown) fine to get to the last

cell, but then
I want to offset one cell down. The code I have for the

offset is
Cell.Offset(1,0).Select, but this comes back with an

error saying it
needs an object. Any ideas on what I'm doing wrong?
Thanks
Paul


---
Message posted from http://www.ExcelForum.com/

.