I am using vlookup formula using in vba as below in sheet 2
samplerange.formula = "VLOOKUP(C1,Sheet!$A:$C,3,0)"
i want to replace the column numbers mentioned in the above formula with named table range as below
samplerange.formula = "VLOOKUP(C1, namedtablerange ,3,0)"
where
namedtablerange = Sheet!$A:$C
first question: would it work if i mention namedtablerange in vlookup formula?
second question: If yes, could some one please help me increating such table range which can be used in the vlookup. It should use the header values (like H1, H2, H3..) instead of column numbers (like $A:$C).
Attached sheet shows two data sets A to C and N to O.
Two table ranges are to be defined for these two sets.
Thanks in advance for your help.
Bookmarks