as simple as this:
Dim JobNumber
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(" & JobNumber & ",'Job List'!C[1]:C[4],1,FALSE)"
Frage
How to look up a result using vlookup with a variable as the look up value in VBA?
Example:
Dim JobNumber
ActiveCell.FormulaR1C1 = _
"=(VLOOKUP(JobNumber,'Job List'!C[1]:C[4],1,FALSE)
Lösung
as simple as this:
Dim JobNumber
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(" & JobNumber & ",'Job List'!C[1]:C[4],1,FALSE)"