Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / January 2008

Tip: Looking for answers? Try searching our database.

When Using VLOOKUP With MATCH How Do I Handle #NA On Data Retrieval?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Katlyn Jones - 31 Jan 2008 18:11 GMT
I am using =VLOOKUP($A$32,Data!$A$4:$M$18,MATCH($B$3,Data!$B$4:$M$4,0)+1,0)  in order to search for two dimensions in a table.  I am a very green user so do not know much in the way of Excel.

The problem is when there is no matching field I receive a #NA.  How do I just get a blank or 0 if there is no matching data?

Thank you in advance for your help.

A Womand Told Me
http://www.awomantoldme.com
JP - 31 Jan 2008 18:18 GMT
Hate to do this, but....wrap your formula in an IF function that uses
ISNA. If ISNA evaluates to TRUE, it will display nothing.

=IF(ISNA(VLOOKUP($A$32,Data!$A$4:$M$18,MATCH($B$3,Data!$B$4:$M
$4,0)+1,0)),"",VLOOKUP($A$32,Data!$A$4:$M$18,MATCH($B$3,Data!$B$4:$M
$4,0)+1,0))

HTH,
JP

> I am using =VLOOKUP($A$32,Data!$A$4:$M$18,MATCH($B$3,Data!$B$4:$M$4,0)+1,0)  in order to search for two dimensions in a table.  I am a very green user so do not know much in the way of Excel.
>
[quoted text clipped - 3 lines]
>
> A Womand Told Mehttp://www.awomantoldme.com
Harlan Grove - 31 Jan 2008 20:08 GMT
JP <jp2...@earthlink.net> wrote...
>Hate to do this, but....wrap your formula in an IF function that
>uses ISNA. If ISNA evaluates to TRUE, it will display nothing.
>
>=IF(ISNA(VLOOKUP($A$32,Data!$A$4:$M$18,
>MATCH($B$3,Data!$B$4:$M$4,0)+1,0)),"",
>VLOOKUP($A$32,Data!$A$4:$M$18,MATCH($B$3,Data!$B$4:$M$4,0)+1,0))
...

There are 3 ways the VLOOKUP call could return #N/A: A32 doesn't occur
in A4:A18 (or is #N/A itself), B3 doesn't occur in B4:M4 (or is #N/A
itself), or the cell corresponding to A32 and B3 happens to evaluate
to #N/A. The last should propagate in most situations. It's possible
to handle the first two with

=IF(COUNT(MATCH($A$32,Data!$A$4:$A$18,0),
MATCH($B$3,Data!$B$4:$M$4,0))=2,
VLOOKUP($A$32,Data!$A$4:$M$18,MATCH($B$3,Data!$B$4:$M$4,0)+1,0),"")
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.