Lookup error in code

Closed
RWomanizer Posts 365 Registration date Monday 7 February 2011 Status Contributor Last seen 30 September 2013 - 11 Mar 2011 à 04:47
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 11 Mar 2011 à 05:35
Hello,

Hi i am using this code for lookup

dim b , n as long
b = Cells(2,1 ).Value
n =LOOKUP(b,{25000,50000,100000;1,2,3})


it doesnot give me result, what is the right syntax for lookup.

1 response

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
11 Mar 2011 à 05:35
there are two ways to use lookup

LOOKUP(lookup_value,lookup_vector,result_vector)

and

LOOKUP(lookup_value,array)