VBA creating relative references to table columns
When I run the code below it enters the correct formula except that the column name in the match function needs to be a relative reference and it is entered as an absolute reference. If I manually enter the formula and drag it to other columns then it updates as expected. How can I make the column reference relative?
Code:
With wsCurrent.ListObjects("tblActiveProjects").DataBodyRange.Columns("B:T")
.Formula2R1C1 = _
"=VLOOKUP([[Project Name]:[Project Name]]," & tblImport.Address(ReferenceStyle:=xlR1C1, External:=True) & ",MATCH(tblActiveProjects[[#Headers],[Project Version]]," & headerImport.Address(ReferenceStyle:=xlR1C1, External:=True) & ",0),FALSE)"
.Value = .Value
End With