Hide Formula Error in Excel

What: In Excel, How do I hide the error values, resulting from the formula?

Why: You may want the correct values to be displayed, but when error is itself the value then what to do.

Error values include #DIV/0!, #N/A, #NAME?, #NULL!, #NUM!, #REF!, and #VALUE!, which may result because of some missing parameters of the formula, or the invalid reference.

How: There are two ways to hide the error values,

1] Hide the Error values using Conditional Formatting

1.      Select the cells that contain the error value. On the Format menu,
      click Conditional Formatting.
2.      In the box on the left, click Formula Is.
3.      In the box on the right, type =ISERROR(reference), where reference is a reference to
      the cell that contains the error value.

4.      Click Format, and then click the Font tab.
5.      Click Format.
6.      In the Color box, select white.

2] Display the value what you want instead of the error, by using IF formula

1.      Select the cell that contains the error value.

Wrap the following formula around the formula in the cell, where old_formula is the formula
that was previously in the cell.

=IF(ISERROR(old_formula),"Your Message",old_formula)

e.g. =IF(ISERROR(1/0),"NA",A2/A3)
      =IF(ISERROR(A2/A3),"",A2/A3)

0 comments:

Post a Comment