Will Ormond
Will Ormond

Reputation: 11

Excel VB Vlookup

I'm trying to use VLOOKUP, but with a variable for the column offset. For example: =VLOOKUP(RC[-1],'Sheet2'!C[-14],1,FALSE) I want to replace the -14 with a named variable.
Can anyone point me in the right direction here?

Upvotes: 1

Views: 392

Answers (1)

Brian Camire
Brian Camire

Reputation: 4825

You might use the OFFSET worksheet function, as in something like: =VLOOKUP(RC[-1],OFFSET(Sheet2!C,0,YourNamedVariable),1,FALSE)

Upvotes: 1

Related Questions