#NA

  • Thread starter Thread starter Dewi
  • Start date Start date
D

Dewi

I have some lookup data in blank fields. If there is no data, then #NA
is displayed, how can I hid the #NA without affecting the look up?

Thanks.
 
Hi Dewi

embed your formula in an IF statement
here's two different approaches

=IF(ISNA(your formula),"",your formula)
OR
=IF(cell_ref="","",your formula)

Cheers
JulieD
 
I have some lookup data in blank fields. If there is no data, then #NA
is displayed, how can I hid the #NA without affecting the look up?

Thanks.

I being a bit slow here but...

This is my formula (I have named the range)
=LOOKUP(A18,serial,item)

How should your suggestions look in my formula?

thanks
 
Hi There,

It is better to use a generic error trapping mechanism (ie: one tha
will trap all errors and just #N/A). To do this you can use ISERROR i
place of ISNA eg:

=IF(ISERROR(LOOKUP(A18,serial,item)),"",LOOKUP(A18,serial,item))

Cheers,

B
 
I don't agree that the generic ISERROR is better. It would hide ANY error,
not just the #N/A.

Suppose this formula........

=VLOOKUP(D1,A1:B10,2,FALSE)*E1

If E1 is not a numeric, you will get #VALUE returned.

The VLOOKUP value may be correct but an alternate error exists that would be
masked by the ISERROR.

This may supply users with a false sense of security about their results.

Gord Dibben Excel MVP
 
You can get #N/A with a LOOKUP formula only when the lookup value in A1
is smaller than the first value in the first column of 'serial'. If it'
fully justified to use LOOKUP(), then one possibility is to test fo
whether the foregoing situation arises:

=IF(A18<INDEX(serial,1,1),"",LOOKUP(A18,serial,item))
 
Hi Gord,

It is true that ISERROR will trap all errors. I suggested using thi
as it makes for a professional looking output. If you need to trap a
individual error so that you can replace it with an alternate value
then trap the individual error, but also use ISERROR to trap othe
errors and also replace them. Thus by replacing the error message wit
an alternate warning/meaningful error message the user is not lulle
into a false sense of security. Good practice really.

Cheers,

B
 

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

Back
Top