Domanda

I know this should be very simple, but something odd is going on with VLookup in Excel. I'm using Excel 2003. I know its ancient. But its what I have.

Heres the scenario

Col A           ColumnB     ColumnC
green            asdf       =VLOOKUP($A1,B1:B4,B:B,TRUE)
blue             ggss       =VLOOKUP($A2,B1:B4,B:B,TRUE) 
orange           green      =VLOOKUP($A3,B1:B4,B:B,TRUE)
red              blue       =VLOOKUP($A4,B1:B4,B:B,TRUE)

I'd expect this to return:

green
blue
#n/a
#n/a

but I get

#REF! on all lines.

I've tried it with TRUE instead of FALSE. Also, with a range name instead of the B1:B4, with the same results.

I must be missing something here. I've tried this in Google Apps and in OpenOffice Calc with similar results. Can someone point me in the right direction?

È stato utile?

Soluzione

Don't use the column range "B:B" for the third argument.

It's looking for a number (numeric column number) =VLOOKUP($A1, B1:B4, 1, TRUE)

EDIT: When I replicate your column data as described, I get:

   A    |   B   |    C
green   | asdf  | green
blue    | ggss  | asdf
orange  | green | blue
red     | blue  | blue

You won't achieve your desired results with TRUE as your last argument

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top