Excel vba copy and paste question

Youseepooo

New Member
Joined
Feb 5, 2019
Messages
37
Hello Fam,


I have a code that i want to adjust. It currently goes to the bottom of the specific "1360 $ " Sheet and copies last range in column A, i want to select and copy the last ranges in the column then paste it in the Summary Sheet.
It currently only posts the last cell in "1360$" is there a coded like someone can help me with to get it to instead copy last cell in Column A, COPY LAST 3, then continue to paste the 3 in cell
"D4"


Sub Findlast()
'


Sheets("1340 $").Select
Range("A7").End(xlDown).Select
Selection.Copy

Sheets("Summary").Select
Range("D7").Select
ActiveSheet.Paste


End Sub



thanks !
 

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
If I've understood correctly, you can do this with a single line of code...

Code:
Sub FindLast()

Sheets("1340 $").Cells(Rows.Count, 1).End(xlUp).Offset(-2).Resize(3).Copy Sheets("Summary").Range("D4")

End Sub
 

Youseepooo

New Member
Joined
Feb 5, 2019
Messages
37
Ya that worked, i code up the same way the macro does because im new and thats how i started to learn. But dude you are a beast. I Really appreciate that and would love to learn more.

i was playing with offset but i didnt know resize now i get it !!
Thanks
Y
 

Youseepooo

New Member
Joined
Feb 5, 2019
Messages
37
Ya that worked, i code up the same way the macro does because im new and that's how i started to learn. But dude you are a beast. I Really appreciate that and would love to learn more.

i was playing with offset but i didn't know "resize" syntax now i get it !!
Thanks
Y
 

Watch MrExcel Video

Forum statistics

Threads
1,109,205
Messages
5,527,399
Members
409,760
Latest member
zeeshansyed

This Week's Hot Topics

Top