Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default lookup problem in excel

Hi, the problem I have with lookup is that it doesn't do an exact match. It matches any part of Lookup_value with any part of Lookup_vector and returns the value.

I need it to bring the result_vector only if the Lookup_value is exactly the same as Lookup_vector. if its not exactly the same then put na or what ever it is it puts.

The code I am using is
=LOOKUP(A2,Sheet2!A2:A53,Sheet2!B2:B53)
and what happens is that it doesn't do an exact match, as long as a part of the Lookup_Value matches Lookup_vector it returns the Result_vector.

I tried using vlookup and hlookup but they where acting funny and I couldn't get them to work

Can some one please help me. Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default lookup problem in excel

Hi,
Use
=VLOOKUP(A2,Sheet2!$A$2:$B$53,2,FALSE)
instead.

Issues with the vector-LOOKUP... from Online-help:
"Important : The values in lookup_vector must be placed in ascending order:
....,-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP may not give
the correct value. Uppercase and lowercase text are equivalent.
Result_vector : is a range that contains only one row or column. It must be
the same size as lookup_vector.
If LOOKUP can't find the lookup_value, it matches the largest value in
lookup_vector that is less than or equal to lookup_value.
If lookup_value is smaller than the smallest value in lookup_vector, LOOKUP
gives the #N/A error value. "

Regards,
Sebastien

"gameboxinc" wrote:

Hi, the problem I have with lookup is that it doesn't do an exact match. It matches any part of Lookup_value with any part of Lookup_vector and returns the value.

I need it to bring the result_vector only if the Lookup_value is exactly the same as Lookup_vector. if its not exactly the same then put na or what ever it is it puts.

The code I am using is
=LOOKUP(A2,Sheet2!A2:A53,Sheet2!B2:B53)
and what happens is that it doesn't do an exact match, as long as a part of the Lookup_Value matches Lookup_vector it returns the Result_vector.

I tried using vlookup and hlookup but they where acting funny and I couldn't get them to work

Can some one please help me. Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default lookup problem in excel

Thank you so much it helped you were great. awsome

"sebastienm" wrote:

Hi,
Use
=VLOOKUP(A2,Sheet2!$A$2:$B$53,2,FALSE)
instead.

Issues with the vector-LOOKUP... from Online-help:
"Important : The values in lookup_vector must be placed in ascending order:
...,-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise, LOOKUP may not give
the correct value. Uppercase and lowercase text are equivalent.
Result_vector : is a range that contains only one row or column. It must be
the same size as lookup_vector.
If LOOKUP can't find the lookup_value, it matches the largest value in
lookup_vector that is less than or equal to lookup_value.
If lookup_value is smaller than the smallest value in lookup_vector, LOOKUP
gives the #N/A error value. "

Regards,
Sebastien

"gameboxinc" wrote:

Hi, the problem I have with lookup is that it doesn't do an exact match. It matches any part of Lookup_value with any part of Lookup_vector and returns the value.

I need it to bring the result_vector only if the Lookup_value is exactly the same as Lookup_vector. if its not exactly the same then put na or what ever it is it puts.

The code I am using is
=LOOKUP(A2,Sheet2!A2:A53,Sheet2!B2:B53)
and what happens is that it doesn't do an exact match, as long as a part of the Lookup_Value matches Lookup_vector it returns the Result_vector.

I tried using vlookup and hlookup but they where acting funny and I couldn't get them to work

Can some one please help me. Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default lookup problem in excel


-----Original Message-----
Hi, the problem I have with lookup is that it doesn't do

an exact match. It matches any part of Lookup_value with
any part of Lookup_vector and returns the value.

I need it to bring the result_vector only if the

Lookup_value is exactly the same as Lookup_vector. if its
not exactly the same then put na or what ever it is it
puts.

The code I am using is
=LOOKUP(A2,Sheet2!A2:A53,Sheet2!B2:B53)
and what happens is that it doesn't do an exact match, as

long as a part of the Lookup_Value matches Lookup_vector
it returns the Result_vector.

I tried using vlookup and hlookup but they where acting

funny and I couldn't get them to work

Can some one please help me. Thank you.

.

Change the formula to
=LOOKUP(A2,Sheet2!A2:A53,Sheet2!B2:B53,false)


to get an exact match
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup problem Excel capabilities Tarquin Krikery Excel Worksheet Functions 4 January 5th 10 05:11 PM
EXCEL LOOKUP PROBLEM Asoka Walpitagama - Brandix College IT Excel Discussion (Misc queries) 2 September 1st 09 02:06 PM
Excel 2007 lookup problem continuing ... Trish Excel Worksheet Functions 3 August 5th 08 05:46 AM
Excel 2007 LOOKUP Problem? robertbjr Excel Worksheet Functions 3 March 18th 08 06:32 PM
LOOKUP Problem grey Excel Worksheet Functions 4 December 30th 05 09:17 AM


All times are GMT +1. The time now is 11:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"