Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
SWEdwards
 
Posts: n/a
Default How do I only get valid "answers" in a VLOOKUP function (no #N/A's

I use a lot of VLOOKUP functions in formulas and am frustrated by the #N/A
results whenever the value I'm looking for isn't in the reference list range.
Is there a simple way to have a formula leave the result blank if the value
isn't found?
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

One way:

=IF(COUNTIF(A1:A100,lookup_value),VLOOKUP(lookup_v alue,A1:B100,2 0),"")

Biff

"SWEdwards" wrote in message
...
I use a lot of VLOOKUP functions in formulas and am frustrated by the #N/A
results whenever the value I'm looking for isn't in the reference list
range.
Is there a simple way to have a formula leave the result blank if the
value
isn't found?



  #3   Report Post  
Gary''s Student
 
Posts: n/a
Default

Use the general form:

=IF(ISNA(VLOOKUP()),"",VLOOKUP())
--
Gary''s Student


"SWEdwards" wrote:

I use a lot of VLOOKUP functions in formulas and am frustrated by the #N/A
results whenever the value I'm looking for isn't in the reference list range.
Is there a simple way to have a formula leave the result blank if the value
isn't found?

  #4   Report Post  
SWEdwards
 
Posts: n/a
Default

Perfect.

Thanks so much!

"Gary''s Student" wrote:

Use the general form:

=IF(ISNA(VLOOKUP()),"",VLOOKUP())
--
Gary''s Student


"SWEdwards" wrote:

I use a lot of VLOOKUP functions in formulas and am frustrated by the #N/A
results whenever the value I'm looking for isn't in the reference list range.
Is there a simple way to have a formula leave the result blank if the value
isn't found?

  #5   Report Post  
 
Posts: n/a
Default

Hi,
try to use ISERROR function:

=IF(ISERROR(VLOOKUP(A1;Sheet1!$A$2:$C$11;2;0));0;V LOOKUP(A1;Sheet1!A2:C11;2;0))

Marian
http:\\skolenieexcel.host.sk



  #6   Report Post  
Biff
 
Posts: n/a
Default

Hi!

While both your suggestion and Gary"s "work", neither is as efficient as my
suggestion.

Why execute 2 lookups when the lookup_value is present?

Using Countif to verify that the lookup_values exsists is faster than using
IF(ISERROR or IF(ISNA.

Biff

wrote in message
ups.com...
Hi,
try to use ISERROR function:

=IF(ISERROR(VLOOKUP(A1;Sheet1!$A$2:$C$11;2;0));0;V LOOKUP(A1;Sheet1!A2:C11;2;0))

Marian
http:\\skolenieexcel.host.sk



  #7   Report Post  
Ragdyer
 
Posts: n/a
Default How do I only get valid "answers" in a VLOOKUP function (no #N/A's

I remember reading a couple of years ago that a speed test showed that an
ISNA plus Match() combination was a more efficient error check then
Countif(), while either one of them was definitely much faster then a double
Vlookup().

--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Biff" wrote in message
...
Hi!

While both your suggestion and Gary"s "work", neither is as efficient as

my
suggestion.

Why execute 2 lookups when the lookup_value is present?

Using Countif to verify that the lookup_values exsists is faster than

using
IF(ISERROR or IF(ISNA.

Biff

wrote in message
ups.com...
Hi,
try to use ISERROR function:


=IF(ISERROR(VLOOKUP(A1;Sheet1!$A$2:$C$11;2;0));0;V LOOKUP(A1;Sheet1!A2:C11;2;
0))

Marian
http:\\skolenieexcel.host.sk




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
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
Using VLOOKUP for one option, if this option is not valid than sec Edd Excel Discussion (Misc queries) 2 March 31st 05 11:11 AM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Can VLOOKUP return multiple answers based on several identical lo. jddtct Excel Worksheet Functions 3 January 11th 05 07:03 AM


All times are GMT +1. The time now is 06:24 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"