Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default VLOOKUP returns incorrect data

I am using VLOOKUP to determine addresses from a master list. However I have
found that if the Lookup Value is NOT in the Table Array, I will get
incorrect information.

For example if the Table Array has entries for Schmidt and Schultz, and I
attempt to lookup Schnell (which is not in the Table Array), I will get the
value for Schultz, which is incorrect.

How can this be avoided? Or, how can I get a message saying the Lookup
Value was not found - rather than getting incorrect results?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default VLOOKUP returns incorrect data

You would have missed out the last argument of VLOOKUP() Range_lookup which
is a logical value that specifies whether you want VLOOKUP to find an exact
match or an approximate match. If TRUE or omitted, an exact or approximate
match is returned. If an exact match is not found, the next largest value
that is less than lookup_value is returned..

=VLOOKUP(A1,Sheet2!A:D,2,FALSE)

OR

=VLOOKUP(A1,Sheet2!A:D,2,0)

If no entry is found it returns NA# . To handle this use IF() ISNA()
combination as below...Replace vlookup_formula string with your actual formula

=IF(ISNA(vlookup_formula),"Not Found",vlookup_formula)


--
Jacob (MVP - Excel)


"burtlake" wrote:

I am using VLOOKUP to determine addresses from a master list. However I have
found that if the Lookup Value is NOT in the Table Array, I will get
incorrect information.

For example if the Table Array has entries for Schmidt and Schultz, and I
attempt to lookup Schnell (which is not in the Table Array), I will get the
value for Schultz, which is incorrect.

How can this be avoided? Or, how can I get a message saying the Lookup
Value was not found - rather than getting incorrect results?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default VLOOKUP returns incorrect data

Hi,

Try this

=if(iserror(vlookup(A3,B4:100,2,0)),"",vlookup(A3, B4:100,2,0))

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"burtlake" wrote in message
...
I am using VLOOKUP to determine addresses from a master list. However I
have
found that if the Lookup Value is NOT in the Table Array, I will get
incorrect information.

For example if the Table Array has entries for Schmidt and Schultz, and I
attempt to lookup Schnell (which is not in the Table Array), I will get
the
value for Schultz, which is incorrect.

How can this be avoided? Or, how can I get a message saying the Lookup
Value was not found - rather than getting incorrect results?


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
This function returns incorrect value sporadically Mike Excel Worksheet Functions 1 July 31st 08 10:12 PM
Pmt formula returns incorrect answer Heinz Excel Discussion (Misc queries) 2 June 6th 08 01:10 AM
DCount returns incorrect Result dee Excel Worksheet Functions 2 April 26th 07 08:54 PM
vlookup based on random result returns incorrect result rickat Excel Worksheet Functions 1 December 6th 05 01:16 PM
Vlookup returns incorrect match Smichaud Excel Discussion (Misc queries) 2 November 30th 04 10:51 AM


All times are GMT +1. The time now is 03:31 PM.

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

About Us

"It's about Microsoft Excel"