Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VLookUp

Status
Not open for further replies.

AiArch

Programmer
Aug 27, 2004
12
US
I am having a problem with the VLOOKUP function. I keep getting #REF! error message in A! on Sheet1. I am not sure why. Below is the function i am using.

=VLOOKUP(A1,Sheet2!A1:A61,2,0)

Is there a limit to how many values you have have in a lookup function. If so is there a better option (besides a database)?
 
what kind of data are you lookinng up?

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
The values look like this CH01, CH02, TB01. Then it returns a value like for CH01 - Chair 1, CH02 - Chair 2, TB01 - Table 1. I tried the regular LookUp Function and it seems to work only if the values are in Ascending order. This is the functino for that

=LOOKUP(E18,Sheet2!A2:A65,Sheet2!B2:B65)

Is there a way that it would work if they are not in Ascending order?
 
You need to reference your entire table in the vlookup, try:

=VLOOKUP(A1,Sheet2!A1:B61,2,0)

[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
I used that at first but I keep getting #REF! error message in A1 on Sheet1. I am stumped why. I have never had this propblem before.
 
Your first post says
=VLOOKUP(A1,Sheet2!A1:A61,2,0)

Meaning you are trying to return the second column entry in a single column range, hence the #REF!

Blue's answer refers to both columns A & B on Sheet2.

Dirk

Everything useful perishes through use....Should I not rejoice at being useless?
 
Sorry about that. Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top