=VLOOKUP validity

G

Guest

=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!
 
R

Roger Govier

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)
 
R

rmd251073

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,VLOOKUP(B16,Quote!A:H,8,FALSE))

Hope this will be useful to you.

All the best.

Rakesh Darji
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

#NAME? on correct formula 4
IF/VLOOKUP between multiple worksheets 1
Sum Until next Blank 2 1
sum until next blank 2
VLOOKUP help 2
SUM/VLOOKUP 1
Vlookup #n/a 6
Vlookup result in a message box 10

Top