VLOOKUP Column Index


N

Nate

Hello,

I'm trying to update the Column Index in a VLOOKUP formula contained in a
file that I received from a former co-worker. The problem is that I'm not
familiar with the format that they're using for the column index number, it
looks like it is a cell reference instead of an actual column number. The
formula is:

=IF(VLOOKUP(G$6,input,$AD100)=0,"-",VLOOKUP(G$6,input,$AD100))

I know that they're using a defined name range for the array - it refers to
another sheet in the same workbook, but I'm not sure how the column index
they're using operates. If there's anybody that's familiar with this and can
explain how it works I would greatly appreciate it. Thanks in advance.
 
Ad

Advertisements

M

Mike H

Hi,

The cell AD100 will contain a number and it is the column number to use in
the vlookup formula. The number must be >=1 and must not be larger than there
are columns in the named range 'input'.

Mike
 
T

T. Valko

it looks like it is a cell reference instead of an actual column number.
=IF(VLOOKUP(G$6,input,$AD100)=0,"-",VLOOKUP(G$6,input,$AD100))

Yes, that's correct.

Cell AD100 should hold the column number that you want the lookup to extract
the result from.

If "input" was the named range A1:C100 and AD100 was 3 the result of the
formula would come from column C. If AD100 was 2 the result would come from
column B.
 
N

Nate

Thank you! That would make sense.

Mike H said:
Hi,

The cell AD100 will contain a number and it is the column number to use in
the vlookup formula. The number must be >=1 and must not be larger than there
are columns in the named range 'input'.

Mike
 
N

Nate

Thanks! That's what I was looking for.

T. Valko said:
Yes, that's correct.

Cell AD100 should hold the column number that you want the lookup to extract
the result from.

If "input" was the named range A1:C100 and AD100 was 3 the result of the
formula would come from column C. If AD100 was 2 the result would come from
column B.
 
Ad

Advertisements

Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top