Select last cell and "dragcopy" to next cell down

sg2004

New Member
Joined
Mar 20, 2009
Messages
46
Hi all,
I tried to record a macro that would allow me to select the last cell with data in column J and K. And then "DragCopy" this data down into the cells beneath them.

So from J22:K22 to J23:K23... the next time the macro is executed i want it to copy from 23 to 24 instead.
____________

The problem is the following code:
Range("J10").End(xlDown)
can't be edited to include K10. "J10:K10" doesnt work, it selects just the J.
and
the DRAGCOPY code generated by the macrorecorder, can't be edited to do what i want because i dont know how to edit the code to include the Offset(1, 0).Select in the destination

Please help
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hello and welcome to MrExcel.

Try

Code:
Sub AFill()
Dim LR As Long
LR = Range("J" & Rows.Count).End(xlUp).Row
Range("J" & LR & ":K" & LR).AutoFill Destination:=Range("J" & LR & ":K" & LR + 1)
End Sub
 
Upvote 0
Thanks so much.
That basically does what I needed, (though you're right it is exactly what i asked for).

I forgot to mention, for colum J, I'd like it to just COPY not complete a series. K is working beautifully by the way thank you :)
 
Upvote 0
Perhaps

Code:
Sub AFill()
Dim LR As Long
LR = Range("J" & Rows.Count).End(xlUp).Row
Range("J" & LR + 1).Value = Range("J" & LR).Value
Range("K" & LR & ":K" & LR).AutoFill Destination:=Range("K" & LR & ":K" & LR + 1)
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,181
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top