VLOOKUP

S

Simon

Hi. I have set up a worksheet with the following headings.
GAME CODE, GAME NAME, QUANTITY, UNIT PRICE, TOTAL.
I have VLOOKUP in Game name and unit price column which use
the Game code column. When I autofill the fuctions down th
column i get #N/A in the rows that no game code is entered.
Is there anyway to leave the function in the cell and
remove the #N/A error message from view so all ya see is a
blank cell. Thanks guys/gals.
 
R

Random

=IF(ISERROR(VLOOKUP(yadayada)),"",VLOOKUP(yadayada))

where the yadayada is your normal VLOOKUP criteria.

Random
 
A

Allan

Try preceding the VLOOKUP function with an 'IF' function.
I also use a similar function (thanks John.)
An example of my function command is as follows :

=IF(A7=0,0,(VLOOKUP(A7,Capital!$A$7:$D$221,2,FALSE)))

(The 'Capital' reference refers to my main source
worksheet)

In Tools/Options/View, ensure you uncheck the 'Zero
Values' box.

In my case, this tells it that if there is nothing in cell
A7, then register it as '0', otherwise use the VLOOKUP
function.
Since you have disabled the show Zero Values box - you
should have a blank cell, instead of the #N/A error. If
you have a Game Code in the Cell then the VLOOKUP should
work just the same.

Works for me. Good Luck.
ALLAN
 

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

Top