Reputation: 482
Can you use INDIRECT as the Column Index Number
when using VLOOKUP
I get a #ref! error when I use =VLOOKUP(B4,H$1:K$6,INDIRECT(C$3),0)
Upvotes: 0
Views: 1794
Reputation: 1
You just need to put quotes around the referenced cell -- so it looks like INDIRECT("C3"). That way it recognizes the input as text.
Upvotes: 0
Reputation: 84465
As mentioned you don't need indirect. Simply use the cell reference direct and wrap in an IFERROR to handle if not found.
=IFERROR(VLOOKUP(B4,H$1:K$6,C$3,0),"")
If you did, for no advantage I can see, want to use indirect then it must be a string as follows:
=VLOOKUP(B4,H$1:K$6,INDIRECT("C3"),0)
Upvotes: 3