How do I hide a formula in a cell linked to a value in another cell, until a value is entered

#N/A means “Not Available”. Excel formulas usually return this in situations where a requested value could not be found for some reason.

A common cause of this error code is the VLOOKUP function, when it can't find a matching value.

The IFERROR function allows you to specify what should be returned if an error occurs.

As example, to replace missing prices with zero, use this formula:

=IFERROR(VLOOKUP(A6,$F$2:$G$4,2,FALSE),0)

Surrounding any formula with IFERROR lets you choose what will happen if an error is returned. Instead of the 0 returned by the previous example, you equally display "Price Missing" with this formula:

=IFERROR(VLOOKUP(A6,$F$2:$G$4,2,FALSE),"Price Missing")

See also: How to use the Excel IFERROR function.