Solved

vlookup help

Posted on 2015-02-04
3
97 Views
Last Modified: 2015-02-23
folks

I have a vlookup

VLOOKUP(A1,Sheet2!B1:C6,2,FALSE)

how can i instead of showing N/A when the condition is false rather state 'NOT FOUND'

all help will do
0
Comment
Question by:rutgermons
3 Comments
 
LVL 18

Accepted Solution

by:
Simon earned 500 total points
ID: 40588415
=IFERROR(VLOOKUP(A1,Sheet2!B1:C6,2,FALSE),"NOT FOUND")
0
 
LVL 4

Expert Comment

by:Monika Bharti
ID: 40588450
Hi,

To return N/A when the condition is false with any error from the VLOOKUP (e.g. including if B2 is populated but that value isn't found by the VLOOKUP) you can use IFERROR function, if you have Excel 2007.

=IFERROR(VLOOKUP(B2,Index!A1:B12,2,FALSE),"N/A")

Open in new window


In earlier versions you need to repeat the VLOOKUP, e.g.
=IF(ISNA(VLOOKUP(B2,Index!A1:B12,2,FALSE)),"N/A",VLOOKUP(B2,Index!A1:B12,2,FALSE))

Open in new window


Note: Replace N/A if you want to change this in other string which you want.
0
 

Expert Comment

by:Matt Dunn
ID: 40625286
You might be expecting that not all of your search values are going to return something from the search table, in which case you can use the iferror function.

It works like this

= iferror (YourVlookupFormula, WhatToSayInsteadOf#N/A)

Here’s an example

=iferror(vlookup(D3,A:C,3,false), “Not Found”)

Or if you would rather it was just blank then instead of having No Value Found, just have the two sets of inverted commas, like this

=iferror(vlookup(D3,A:C,3,false), “”)

(Source: http://www.excelvlookuphelp.com/i-dont-want-to-see-na-if-the-lookup-value-isnt-found/)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question