Hello all,
I'm trying to create an array loop that goes through columns A1,D1,G1, J1 (Keeping the headers) from one workbook and paste all the data to one column (keeping cell formatting) on another workbook.
The data in the copied columns (A,D,G,J) will vary every time the macro runs so I'm not sure how to set up the initial array for this.
I think I have the destination ready with:
Any help would be much appreciated!
I'm trying to create an array loop that goes through columns A1,D1,G1, J1 (Keeping the headers) from one workbook and paste all the data to one column (keeping cell formatting) on another workbook.
The data in the copied columns (A,D,G,J) will vary every time the macro runs so I'm not sure how to set up the initial array for this.
I think I have the destination ready with:
VBA Code:
Private Sub CommandButton2_Click()
Dim coV As Worksheet
Dim rr As Worksheet
Dim destLast As Long
Set coV = Workbooks("Cov19 Analysis.xlsm").Worksheets("Reruns To Pull")
Set rr = Workbooks("Rerun_new.xlsx").Worksheets("October")
destLast = rr.Cells(rr.Rows.Count, "A").End(xlUp).Offset(1).Row
?????? .Copy _
rr.Range("A" & destLast)
End Sub
Any help would be much appreciated!