A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi Dave
We can use column C to calculate last row, then we can build the formula string and insert it in A2. Then use FillDown to copy the formula down as required.
Sub InsertFormula()
Dim LastRow As Long
Dim MyFormula As String
LastRow = Range("C" & Rows.Count).End(xlUp).Row
MyFormula = "=Vlookup(B2,C$2:S$" & LastRow & ",F2,False)"
Range("A2").Formula = MyFormula
Range("A2:A" & LastRow).FillDown
End Sub