OK
Change the code in module1 (alt F11) to
Sub Test()
For N = 2 To ThisWorkbook.Sheets("Config").Cells(Rows.Count, 1).End(xlUp).Row
Workbooks.Open Filename:=ThisWorkbook.Sheets("Config").Cells(N, 1), ReadOnly:=True
ActiveWorkbook.Sheets(ThisWorkbook.Sheets("Config").Cells(N, 2).Value).Activate
For M = 2 To Cells(Rows.Count, 1).End(xlUp).Row
If Cells(M, 1) = 1 Then
Range(Cells(M, 1), Cells(M, 8)).Copy
ThisWorkbook.Sheets("Target").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial (xlPasteValues)
End If
Next M
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
Next N
End Sub
I've assumed that your specified sheet is called "Target".
Bookmarks