Log in

View Full Version : Limitations of VLOOKUP


Amyunimus
Feb 21, 2007, 11:37 AM
I have a column of values that can't be put in ascending order.

20
55
3
61
2
etc.

I want to lookup another value that corresponds to each of these numbers.

1 345
2 568
3 111
4 908
5 786
etc...

However, since the lookup values are not ordered, the VLOOKUP function does not return a value if the lookup value is less than its position in the list.

For example, in the first list "2" would not return a value because it appears 5th on the list, and the function is referencing the array from row 5 and above.

Is there any way to just get a value that corresponds to the lookup number, ordered or not?

Thanks!

ScottGem
Feb 21, 2007, 11:54 AM
The order of the value being looked up doesn't matter. The syntax of the VLookup is:

VLookup(value, range, offset)

The range is the table you are looking up with the first column being the value to lookup and the second or subsequent columns being the value to return.

So, if the lookup value is 2, then the function will return 568.

Capuchin
Feb 21, 2007, 12:01 PM
I agree with scott here, I don't remember it needing to be in order for VLOOKUP to work.

Amyunimus
Feb 21, 2007, 02:41 PM
Thanks, I just adjusted the range for all cells and it worked.