I think you could get the data directly from the table
Code:
Sub Create_Workbook_From_Template_and_Save()
Dim rng As Range, cel As Range
Dim Flname As String
Dim Rev As String
Dim Title As String
Dim Subcontractor As String
Set rng = Workbooks("CRS Data Input").Worksheets("Data").ListObjects("Table_query").ListColumns(2).DataBodyRange.SpecialCells(xlCellTypeVisible)
For Each cel In rng
Flname = cel.Value
Rev = cel.Offset(, 4).Value
Title = cel.Offset(, 3).Value
Subcontractor = cel.Offset(, 7).Value
'Open new workbook from template
Workbooks.Open FileName:=ThisWorkbook.Path & "\CRS Template.xlsx", Editable:=False
'Copy data from data sheet to template
Workbooks("CRS Template").Worksheets("CRS").Range("K1") = Flname
Workbooks("CRS Template").Worksheets("CRS").Range("N1") = Rev
Workbooks("CRS Template").Worksheets("CRS").Range("K2") = Title
Workbooks("CRS Template").Worksheets("CRS").Range("K3") = Subcontractor
'Save template in Output folder with custom filename
Workbooks("CRS Template").Close SaveChanges:=True, FileName:=ThisWorkbook.Path & "\Output\" & Flname & "-CRS.xlsx"
Next cel
End Sub
a couple of links for more insight into tables:
https://www.thespreadsheetguru.com/b...t-excel-tables
https://www.jkp-ads.com/Articles/Excel2007TablesVBA.asp