View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Charles Chickering Charles Chickering is offline
external usenet poster
 
Posts: 272
Default finding first empty cell

I believe that means that the active cell is the last row, so when you do
..End(xlDown) you get row 65536. You then try to offset that by one row which
returns the Runtime error. Try working from the bottom up:
With Worksheets("Master")
.Range("A" & .Rows.Count).End(xlUp).Offset(1).PasteSpecial xlPasteAll
End With
--
Charles Chickering

"A good example is twice the value of good advice."


" wrote:

I am attempting to paste some data into the first non-blank row below
a matrix of data. I'm using the following coding to do this (which I
have used before):

Sheets("Master").Select
Range("A1").Select
Selection.End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste

Now, I keep getting a run time error on the selection line. What am I
doing wrong?

Thanks.