Paste at end of data

Closed
LV - Jan 15, 2015 at 07:07 AM
 LV - Jan 22, 2015 at 04:27 AM
Hello,

I'm trying to write something that will copy and paste cells AC10:AQ15 from a sheet called "Format" to the end of column AC on the sheet called "TT-M". There could be any number of rows on TT-M so I need it to find the bottom and then paste on the next row (ie. the first blank).

I have
Sheets("Format").Select
Range("AC10:AQ15").Select
Selection.Copy
Sheets("TT - M").Select
Range("AC7").End(x1Up).Offset(1, 0).Select
ActiveCell.paste
but it's not working.

If anyone has the time to look at this code and point out my errors, I'd be really grateful.

Thank you,
LV.

2 replies

Here you are:

Sheets("Format").Range("AC10:AQ15").Copy Destination:=Sheets("TT - M").Range("AC" & Rows.Count).End(xlUp).Offset(1, 0)


Note that it is End(xlup) not End(x1up).
0
That's great and working now - Thank You.
Can you tell me what the Range("AC"&Rows.Count).End(xlUp) actually does?
I thought ("AC"&Rows.Count) would go to the last row with data
And then End(xlUp) will move up ?

Sorry if this is a silly question, but I'm a self taught beginner and just finding my way.

Thank You,
LV.
0
it goes to the last row in the sheet. and then goes up to the last row with data.
So, it'll jump to say, AC65535 (excel2003), and then up to AC50 if the cell in that row has data in it. The offset will then go down a single row ready for input.

is that not what you need? I was a bit confused by you having AC7 but that didn't match your requirement.
0
Thank you very much Ray. That's just what I need. The AC7 is just where the first data in the column is.

Really appreciate your help.
LV.
0