The syntax for Vlookup is (lookup_value,table_array,col_index_num,[range_lookup]) and I am trying to write a vlookup formula with VBA.
The important code leading up to the vlookup is this:
Dim POS As Range
<make selection of range>
Set POS = Selection
Right now it looks like this:
Cells(2,8) = "=VLOOKUP(D2," & Range(POS) & ",52,FALSE)"
Note: the 52 will also be a variable such as "colVar" later on, but I am currently crossing one bridge, and will get to that one when I can.
Appreciate any help anyone can give me!