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 !
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,414
Messages
6,119,373
Members
448,888
Latest member
Arle8907

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