The below script currently loops through a list of data and copies a range from one workbook to another depending on a value in a cell.
For i = 3 To LastRow
If Cells(i, 1) <> "" And Cells(i, 13) = "ü" Then
Range(Cells(i, 1), Cells(i, 12)).Select
Selection.Copy
workbooks.Open Filename:=iForm
Worksheets("Statistics").Select
erow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Worksheets("Statistics").Cells(erow, 1).PasteSpecial Paste:=xlPasteValues
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.CutCopyMode = False
End If
Next i
Rather copying the range from A:L I would like to copy columns A & L, I've tried updating this however I keep getting errors, please help. I thank you in advance.