Lookup error in code

[Closed]
Report
Posts
365
Registration date
Monday February 7, 2011
Status
Contributor
Last seen
September 30, 2013
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
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 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
there are two ways to use lookup

LOOKUP(lookup_value,lookup_vector,result_vector)

and

LOOKUP(lookup_value,array)