Look up for a value left to the lookupvalue

[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,

As we know that for using vlookup, the reference value should be in right of the lookup value.

but how can i look up for a value which is left side of the lookup value.



2 replies

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
you cannot use lookup in that case. you could either make use of a temp column to make it appear on right hand side or you can use a combination of MATCH and INDEX to find the value
Posts
365
Registration date
Monday February 7, 2011
Status
Contributor
Last seen
September 30, 2013
119
the lookup funciton is working for this in excel.

but i am not able to get correct syntax in macros.

i also problem with another lookup function which is as

b = range("a4").value
worksheet.function.lookup(b,{25000,75000,150000;1,2,3})

but it not working in macros.
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
is this correct ?
worksheet.function.lookup

i would think you need
worksheetfunction.lookup

again if you could add sample book with code and error, it would be easier and quicker to tell you what can be done