Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arla
 
Posts: n/a
Default #N/A in VLookup - Can I use another function that will return 0?

I am using a VLookup function. I need to find an exact match, but when there
is no match, I would like to see a zero, rather than #N/A. Can someone help
me with a different formula to produce similar results as I am getting with
the VLookup without the #N/A?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default #N/A in VLookup - Can I use another function that will return 0?

=if(iserror(vlookup(...)),0,vlookup(....))



Arla wrote:

I am using a VLookup function. I need to find an exact match, but when there
is no match, I would like to see a zero, rather than #N/A. Can someone help
me with a different formula to produce similar results as I am getting with
the VLookup without the #N/A?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arla
 
Posts: n/a
Default #N/A in VLookup - Can I use another function that will return

I am sorry if I am being dense; so now that I have added the "iserror"
portion to the formula, do I need to have "vlookup" in two spots rather than
just once?

"Dave Peterson" wrote:

=if(iserror(vlookup(...)),0,vlookup(....))



Arla wrote:

I am using a VLookup function. I need to find an exact match, but when there
is no match, I would like to see a zero, rather than #N/A. Can someone help
me with a different formula to produce similar results as I am getting with
the VLookup without the #N/A?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default #N/A in VLookup - Can I use another function that will return

Yes, once to check if the VLOOKUP returns an error, once to get the result
if it doesn't.

--

HTH

RP

"Arla" wrote in message
...
I am sorry if I am being dense; so now that I have added the "iserror"
portion to the formula, do I need to have "vlookup" in two spots rather

than
just once?

"Dave Peterson" wrote:

=if(iserror(vlookup(...)),0,vlookup(....))



Arla wrote:

I am using a VLookup function. I need to find an exact match, but

when there
is no match, I would like to see a zero, rather than #N/A. Can

someone help
me with a different formula to produce similar results as I am getting

with
the VLookup without the #N/A?


--

Dave Peterson



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default #N/A in VLookup - Can I use another function that will return

Actually, not true. If you use the IFERROR function rather than
IF(ISERROR()), then you can do this:

=IFERROR(VLOOKUP(), 0)

This will return the result of the VLOOKUP if the VLOOKUP is successful but
will return the second parameter (in this case, 0), if the VLOOKUP is
unsuccessful.

This is definitely a more efficient approach than the IF(ISERROR())
construction since the VLOOKUP is performed only once.

-Charles


"Bob Phillips" wrote:

Yes, once to check if the VLOOKUP returns an error, once to get the result
if it doesn't.

--

HTH

RP

"Arla" wrote in message
...
I am sorry if I am being dense; so now that I have added the "iserror"
portion to the formula, do I need to have "vlookup" in two spots rather

than
just once?

"Dave Peterson" wrote:

=if(iserror(vlookup(...)),0,vlookup(....))



Arla wrote:

I am using a VLookup function. I need to find an exact match, but

when there
is no match, I would like to see a zero, rather than #N/A. Can

someone help
me with a different formula to produce similar results as I am getting

with
the VLookup without the #N/A?

--

Dave Peterson






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default #N/A in VLookup - Can I use another function that will return

=iferror() was added in xl2007, though.

Charles Moore wrote:

Actually, not true. If you use the IFERROR function rather than
IF(ISERROR()), then you can do this:

=IFERROR(VLOOKUP(), 0)

This will return the result of the VLOOKUP if the VLOOKUP is successful but
will return the second parameter (in this case, 0), if the VLOOKUP is
unsuccessful.

This is definitely a more efficient approach than the IF(ISERROR())
construction since the VLOOKUP is performed only once.

-Charles

"Bob Phillips" wrote:

Yes, once to check if the VLOOKUP returns an error, once to get the result
if it doesn't.

--

HTH

RP

"Arla" wrote in message
...
I am sorry if I am being dense; so now that I have added the "iserror"
portion to the formula, do I need to have "vlookup" in two spots rather

than
just once?

"Dave Peterson" wrote:

=if(iserror(vlookup(...)),0,vlookup(....))



Arla wrote:

I am using a VLookup function. I need to find an exact match, but

when there
is no match, I would like to see a zero, rather than #N/A. Can

someone help
me with a different formula to produce similar results as I am getting

with
the VLookup without the #N/A?

--

Dave Peterson





--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default #N/A in VLookup - Can I use another function that will return

When VLookup finds a match, it returns the Lookup_Value itself. Is there a
way to return the position in the Table_array where VLookup found the match?

"Charles Moore" wrote:

Actually, not true. If you use the IFERROR function rather than
IF(ISERROR()), then you can do this:

=IFERROR(VLOOKUP(), 0)

This will return the result of the VLOOKUP if the VLOOKUP is successful but
will return the second parameter (in this case, 0), if the VLOOKUP is
unsuccessful.

This is definitely a more efficient approach than the IF(ISERROR())
construction since the VLOOKUP is performed only once.

-Charles


"Bob Phillips" wrote:

Yes, once to check if the VLOOKUP returns an error, once to get the result
if it doesn't.

--

HTH

RP

"Arla" wrote in message
...
I am sorry if I am being dense; so now that I have added the "iserror"
portion to the formula, do I need to have "vlookup" in two spots rather

than
just once?

"Dave Peterson" wrote:

=if(iserror(vlookup(...)),0,vlookup(....))



Arla wrote:

I am using a VLookup function. I need to find an exact match, but

when there
is no match, I would like to see a zero, rather than #N/A. Can

someone help
me with a different formula to produce similar results as I am getting

with
the VLookup without the #N/A?

--

Dave Peterson




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default #N/A in VLookup - Can I use another function that will return

Charles -- that works perfectly in my application; way more efficient.

Thanks,
Drew

"Charles Moore" wrote:

Actually, not true. If you use the IFERROR function rather than
IF(ISERROR()), then you can do this:

=IFERROR(VLOOKUP(), 0)

This will return the result of the VLOOKUP if the VLOOKUP is successful but
will return the second parameter (in this case, 0), if the VLOOKUP is
unsuccessful.

This is definitely a more efficient approach than the IF(ISERROR())
construction since the VLOOKUP is performed only once.

-Charles


"Bob Phillips" wrote:

Yes, once to check if the VLOOKUP returns an error, once to get the result
if it doesn't.

--

HTH

RP

"Arla" wrote in message
...
I am sorry if I am being dense; so now that I have added the "iserror"
portion to the formula, do I need to have "vlookup" in two spots rather

than
just once?

"Dave Peterson" wrote:

=if(iserror(vlookup(...)),0,vlookup(....))



Arla wrote:

I am using a VLookup function. I need to find an exact match, but

when there
is no match, I would like to see a zero, rather than #N/A. Can

someone help
me with a different formula to produce similar results as I am getting

with
the VLookup without the #N/A?

--

Dave Peterson




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
How can I use the vlookup function to return a sum of the values? Chaandni Excel Discussion (Misc queries) 4 November 7th 05 03:05 PM
VLOOKUP Function Chris Manning Excel Discussion (Misc queries) 2 June 2nd 05 10:26 PM
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
Array Function with VLOOKUP CoRrRan Excel Worksheet Functions 15 April 8th 05 05:54 PM
Vlookup w/Date Function cym Excel Worksheet Functions 1 March 25th 05 08:21 PM


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