PDA

View Full Version : Sleeper: Copy and pasting selection of data



Klartigue
09-14-2011, 11:35 AM
Sub CopyandPasteCells()
Dim NumBlocks As Long
Dim LastRow As Long
Dim i As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 2 To LastRow
Range("A:G").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=18
Windows("Broker Volume Master.xlsx").Activate
Application.Run "BLPLinkReset"
ActiveWindow.SmallScroll Down:=45
Range("A60").Select
Windows("Broker Volume Master.xlsx").Activate
ActiveSheet.Paste
End Sub


I am trying to select all cells (not the entire spreadsheet but all cells with values) and paste it into another spreadsheet. Can you help me with this code? The cells go from row 2 to lastrow and columns from A to G

Thanks!!