Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide or change error message in Vlookup result

Status
Not open for further replies.

pro356

Technical User
Jan 26, 2002
62
US
I am using a VLookup in Excel to auto-fill in info on purchase orders when entering just the p/o # on another sheet as new inventory items are added for that p/o. Problem is I need the formula down the entire column but until a p/o # is entered on the new sheet it shows the error message "#N/A". Is there a way to suppress that or to show a literal instead until a p/o # is entered to match?
 
=if(ISNA(VlookupFormula),"Whatever You want to display here",VlookupFormula)

should sort that out

Rgds, Geoff

"Having been erased. the document thjat you are seeking. Must now be retyped"

Please read FAQ222-2244 before you ask a question
 
Geoff,

Sorry, but I remain somewhat confused. If I'm reading your formula correctly you are saying I put my same VLoopup formula into the function twice. I think I followed those instructions but it didn't like my function. Can you give me a basic example so my ignorance can be overcome.



 

[tt]
=if(ISNA(Vlookup(A1,$D$1:$G$1,2,false)),"Whatever You want to display here",Vlookup(A1,$D$1:$G$1,2,false))
[/tt]


Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
Geoff is gone for the day. Skip has shown you what he meant. Here is another view of the concept as an actual formula:

=IF(ISNA(VLOOKUP(A12,$D$2:$E$15,2,0)),"",VLOOKUP(A12,$D$2:$E$15,2,0))

That is the general case for use when you don't have much control over the thing you are using for the lookup. In your case you know that the thing is blank so you should be able to use this slightly simpler form:

=IF(A12="","",VLOOKUP(A12,$D$2:$E$15,2,0))

Hope that helps.
 
Thanks to all. I was finally able to get it and it works like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top