Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default =VLOOKUP validity

=VLOOKUP(B16,Quote!A:H,8,FALSE)
In this formula, what must I add to have the result return a 0 (zero) if the
lookup does not find the value in the lookup range. I can't have a N/A value?
I guess I need to use an =IF statement but cannot get it right.

Something like =IF(VLOOKUP(B16,Quote!A:H,8,FALSE) ##is found, then##
VLOOKUP(B16,Quote!A:H,8,FALSE) ##else value = 0##

Thanks in advance!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default =VLOOKUP validity

Hi Greg

Rather than using 2 Vlookups which are expensive on processing time, use
a Countif to see if the value from B16 exists in column A of the lookup
table first.

=IF(COUNTIF(Quote!A:A,B16),VLOOKUP(B16,Quote!A:H,8 ,FALSE),0)


--
Regards

Roger Govier


"Greg H" <Greg wrote in message
...
=VLOOKUP(B16,Quote!A:H,8,FALSE)
In this formula, what must I add to have the result return a 0 (zero)
if the
lookup does not find the value in the lookup range. I can't have a N/A
value?
I guess I need to use an =IF statement but cannot get it right.

Something like =IF(VLOOKUP(B16,Quote!A:H,8,FALSE) ##is found, then##
VLOOKUP(B16,Quote!A:H,8,FALSE) ##else value = 0##

Thanks in advance!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default =VLOOKUP validity

the best way to get rid of this problem is use formula as given below:

=IF(ISERROR(VLOOKUP(B16,Quote!A:H,8,FALSE),0,VLOOK UP(B16,Quote!A:H,8,FALSE))

Hope this will be useful to you.

All the best.

Rakesh Darji



Greg H wrote:
=VLOOKUP(B16,Quote!A:H,8,FALSE)
In this formula, what must I add to have the result return a 0 (zero) if the
lookup does not find the value in the lookup range. I can't have a N/A value?
I guess I need to use an =IF statement but cannot get it right.

Something like =IF(VLOOKUP(B16,Quote!A:H,8,FALSE) ##is found, then##
VLOOKUP(B16,Quote!A:H,8,FALSE) ##else value = 0##

Thanks in advance!


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 show a validity by a prompted symbol in colour? Maray Excel Worksheet Functions 1 February 3rd 09 10:47 AM
VLookUp - Does the VLookUp return the exact information? Cpviv Excel Worksheet Functions 2 October 28th 08 09:57 AM
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Which is faster: VLOOKUP-worksheet or VB-array VLOOKUP? erikhs[_20_] Excel Programming 1 August 6th 06 06:18 PM
Recordset object loses validity in call between function & subrout Dick Kusleika[_3_] Excel Programming 1 August 13th 04 08:22 AM


All times are GMT +1. The time now is 04:10 AM.

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"