[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Substitute for Vlookup

amirstal

12/15/2006 7:30:00 PM

Is there any substitute for the vlookup function when the table
lookup_values are numbers but not in a continuing descending order?

For example:
A1 B1
1 5.5
8 5.6
14 5.7
19 5.8

Works: look for the number 1 in the table A1:B1 and return the second
column, if not zero => the result is 5.5

Does not work: look for the number 2 in the table A1:B1 and return the
second column, if not zero =>the result is 5.5 as well instead of zero.

I know I can manually fill the numbers between 1 and 8, but if it is a
very big table, I don't want to spend too much time on that.

Thanks.

1 Answer

Marc

12/15/2006 9:58:00 PM

0

Sounds like you need to use the last parameter in the Vlookup function, and
set it to false, then it must find an exact match. If you omit the last
parameter, it will find the closest match...

However, it will return #N/A if it doesn't find a match, when you set the
last parameter to false or 0... but there are ways to get around that...

"amirstal" <amirstal@yahoo.com> wrote in message
news:1166211009.485607.160830@80g2000cwy.googlegroups.com...
> Is there any substitute for the vlookup function when the table
> lookup_values are numbers but not in a continuing descending order?
>
> For example:
> A1 B1
> 1 5.5
> 8 5.6
> 14 5.7
> 19 5.8
>
> Works: look for the number 1 in the table A1:B1 and return the second
> column, if not zero => the result is 5.5
>
> Does not work: look for the number 2 in the table A1:B1 and return the
> second column, if not zero =>the result is 5.5 as well instead of zero.
>
> I know I can manually fill the numbers between 1 and 8, but if it is a
> very big table, I don't want to spend too much time on that.
>
> Thanks.
>