<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Dealing with NA() Errors</title>
	<atom:link href="http://www.automateexcel.com/2008/09/20/dealing-with-na-errors/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automateexcel.com/2008/09/20/dealing-with-na-errors/</link>
	<description>Everything Excel. Only Excel.</description>
	<lastBuildDate>Mon, 21 Nov 2011 07:25:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: JP</title>
		<link>http://www.automateexcel.com/2008/09/20/dealing-with-na-errors/comment-page-1/#comment-875</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Sat, 20 Sep 2008 16:55:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=898#comment-875</guid>
		<description>I guess it depends on your approach. My formula will return nothing if either the lookup value doesn&#039;t exist in the array, or if it exists more than once. You might want to be alerted to that fact, and manually check your data for dupes. If you use the &quot;&gt;0&quot; approach, you won&#039;t know.</description>
		<content:encoded><![CDATA[<p>I guess it depends on your approach. My formula will return nothing if either the lookup value doesn&#8217;t exist in the array, or if it exists more than once. You might want to be alerted to that fact, and manually check your data for dupes. If you use the &#8220;&gt;0&#8243; approach, you won&#8217;t know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randy Harmelink</title>
		<link>http://www.automateexcel.com/2008/09/20/dealing-with-na-errors/comment-page-1/#comment-874</link>
		<dc:creator>Randy Harmelink</dc:creator>
		<pubDate>Sat, 20 Sep 2008 15:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=898#comment-874</guid>
		<description>Good tip on using COUNTIF(), but I think the condition should be greater than zero instead of equal to one.  It depends on whether the item being in the lookup table more than once is a problem, and how to handle the problem.

Also, I&#039;ve tried to get in the habit of only hard-coding the column number when I&#039;m doing &quot;quick and dirty&quot; VLOOKUP() function.  In a long-term application, it can be a problem if you start inserting columns in a table.  So, instead of:

=VLOOKUP(B18,B6:C13,2,FALSE)

I&#039;d use:

=VLOOKUP(B18,B6:C13,COLUMNS(B:C),FALSE)

Then everything automatically adjusts if you insert a new column in your table for some reason.</description>
		<content:encoded><![CDATA[<p>Good tip on using COUNTIF(), but I think the condition should be greater than zero instead of equal to one.  It depends on whether the item being in the lookup table more than once is a problem, and how to handle the problem.</p>
<p>Also, I&#8217;ve tried to get in the habit of only hard-coding the column number when I&#8217;m doing &#8220;quick and dirty&#8221; VLOOKUP() function.  In a long-term application, it can be a problem if you start inserting columns in a table.  So, instead of:</p>
<p>=VLOOKUP(B18,B6:C13,2,FALSE)</p>
<p>I&#8217;d use:</p>
<p>=VLOOKUP(B18,B6:C13,COLUMNS(B:C),FALSE)</p>
<p>Then everything automatically adjusts if you insert a new column in your table for some reason.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://www.automateexcel.com/2008/09/20/dealing-with-na-errors/comment-page-1/#comment-872</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Sat, 20 Sep 2008 12:51:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.automateexcel.com/?p=898#comment-872</guid>
		<description>An even better way is:

IF(COUNTIF(B6:C13,B18)=1,vlookup(B18,B6:C13,2,FALSE),&quot;&quot;)

This avoid the VLOOKUP being run twice, if the value is actually in the lookup array.

--JP</description>
		<content:encoded><![CDATA[<p>An even better way is:</p>
<p>IF(COUNTIF(B6:C13,B18)=1,vlookup(B18,B6:C13,2,FALSE),&#8221;")</p>
<p>This avoid the VLOOKUP being run twice, if the value is actually in the lookup array.</p>
<p>&#8211;JP</p>
]]></content:encoded>
	</item>
</channel>
</rss>

