how to hide #N/A ?

S

Steven

i have change some formulars along the lines of this:

=LOOKUP(G13,MLS!B$2:B$112,MLS!C$2:C$112)


change to:

=LOOKUP(G13,paynumber,staffnames)


only problem now is i end up with rows and rows of #N/A's until data is
input, anyway to hide these like you can with zero values?

Many thanks,
Steve
 
A

Aladin Akyurek

Would...

=IF((G13="")+(G13<INDEX(paynumber,1),"",LOOKUP(G13,paynumber,staffnames))

suffice?
 
D

Don Guillett

try
=if(isna(LOOKUP(G13,paynumber,staffnames),"",LOOKUP(G13,paynumber,staffnames
)
 
D

Domenic

Another way would be to hide them using conditional formatting, by choosing
white for your font color when the cell's value equals #N/A.

Assuming that your range of cells begins in A5:

Select your range of cells
Format > Conditional Formatting
Change "Cell Value Is" to "Formula Is"
=ISNA(A5)
Choose white as your font color
Click Ok
 
S

Steven

so it would seem my attempt at simplifying a formula has ended up making it
even worse! thanks for the help guys, but i think it would be easier if i
used the original formula format, unless there's a simpler solution?

Many thanks,
Steve

"why does MS make such simple things so god damn complicated"
 
D

Don Guillett

Just use what I sent and you will be happy
=IF(ISNA(LOOKUP(N3,$H$1:$H$8,$I$1:$I$8)),"",LOOKUP(N3,$H$1:$H$8,$I$1:$I$8))
 
A

Aladin Akyurek

Steven said:
so it would seem my attempt at simplifying a formula has ended up making it
even worse! thanks for the help guys, but i think it would be easier if i
used the original formula format, unless there's a simpler solution?

Many thanks,
Steve

"why does MS make such simple things so god damn complicated"

Actually, I should have brought up this before making a reply...

What does "until data is input" mean -- until something is in G13 or
something is in MLS!B$2:B$112 (paynumber), MLS!C$2:C$112 (staffnames)?

If the former and using LOOKUP is justified, then what I proposed will do
job.
All this depends of course MLS!B$2:C$112 is sorted in ascending order on
column B (and
covers all possible lookup values). If invoking LOOKUP is justified, there
is no need for:
=IF(ISNA(LOOKUP(),"",LOOKUP())
 
A

Aladin Akyurek

=IF((G13="")+(G13<INDEX(paynumber,1)),"",LOOKUP(G13,paynumber,staffnames))

should work (I had a paren missing in the condition of IF in my initial
reply.).
 
R

Rob van Gelder

Ideally, there would be a formula which worked a little like:

=NNA(LOOKUP(N3,$H$1:$H$8,$I$1:$I$8), "")

Where if the lookup formula returned #N/A then NNA returns "", else return
result of lookup.

But there's nothing which works that way, so repeating the formula is the
only option here.
 
Top