close

Hi I would really appreciate some help with this problem. I have a table of
data that I am using a lookup on, so that I can preset formulae I am also
using the isblank function to hide the error message when there is no lookup
value entered. What I'm trying to add to this is something whereby if a
lookup value that isn't in the table is entered, a blank will be displayed.
What I have so far is this

=IF(ISBLANK(B2),quot;quot;,VLOOKUP(B2,Books,2,FALSE))

which enters a blank if cell b2 is empty, or the data from the table if
there is a match, what I want is something to catch when there is no match
and enter a blank then.

Any help will be greatly appreciated

Thanks
Steve

Hi

The usual way is to enclose your VLOOKUP in an ISERROR formula.
=IF(ISBLANK(B2),quot;quot;,IF(ISERROR(VLOOKUP(B2,Books,2,F ALSE)),quot;quot;,VLOOKUP(B2,Books,2,FALSE))
I haven't tested it, but you get the idea?

Andy.

quot;Stevequot; gt; wrote in message
...
gt; Hi I would really appreciate some help with this problem. I have a table
gt; of
gt; data that I am using a lookup on, so that I can preset formulae I am also
gt; using the isblank function to hide the error message when there is no
gt; lookup
gt; value entered. What I'm trying to add to this is something whereby if a
gt; lookup value that isn't in the table is entered, a blank will be
gt; displayed.
gt; What I have so far is this
gt;
gt; =IF(ISBLANK(B2),quot;quot;,VLOOKUP(B2,Books,2,FALSE))
gt;
gt; which enters a blank if cell b2 is empty, or the data from the table if
gt; there is a match, what I want is something to catch when there is no match
gt; and enter a blank then.
gt;
gt; Any help will be greatly appreciated
gt;
gt; Thanks
gt; Steve
This should deal with blanks and errors

=if(isna(VLOOKUP(B2,Books,2,FALSE)),quot;quot;,VLOOKUP(B2, Books,2,FALSE))quot;Stevequot; wrote:

gt; Hi I would really appreciate some help with this problem. I have a table of
gt; data that I am using a lookup on, so that I can preset formulae I am also
gt; using the isblank function to hide the error message when there is no lookup
gt; value entered. What I'm trying to add to this is something whereby if a
gt; lookup value that isn't in the table is entered, a blank will be displayed.
gt; What I have so far is this
gt;
gt; =IF(ISBLANK(B2),quot;quot;,VLOOKUP(B2,Books,2,FALSE))
gt;
gt; which enters a blank if cell b2 is empty, or the data from the table if
gt; there is a match, what I want is something to catch when there is no match
gt; and enter a blank then.
gt;
gt; Any help will be greatly appreciated
gt;
gt; Thanks
gt; Steve

全站熱搜
創作者介紹
創作者 software 的頭像
software

software

software 發表在 痞客邦 留言(0) 人氣()