XL: How to Suppress Error Values on a Worksheet

Last reviewed: February 2, 1998
Article ID: Q87299

The information in this article applies to:

  • Microsoft Excel 98 Macintosh Edition
  • Microsoft Excel for Windows, versions 3.0, 4.0, 5.0
  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel for the Macintosh, versions 1.x, 2.x, 3.x, 4.0, 5.0
  • Microsoft Excel for OS/2, versions 3.0

SUMMARY

In Microsoft Excel, you can prevent error values (such as #N/A, #VALUE!, #REF!, and #NUM!) from being displayed.

MORE INFORMATION

To suppress error values, use either of the following methods:

Method 1

Use the following IF statement

   =IF(ISERROR(<formula>),"",<formula>)

where <formula> is the formula for which you want to suppress the error value. If <formula> returns an error, this statement returns "" (a null character), otherwise it returns the result of <formula>.

NOTE: There is no space between the quotation marks.

Method 2

Use a combination of colors and custom formats to "hide" the error value. To make error values invisible, use the background color for everything in the selected cells except numbers.

If you are using Microsoft Excel version 5.0 or 7.0, follow these steps:

  1. Select the cells you want to format.

  2. On the Format menu, click Cells. Then, in the Cells dialog box, click the Font tab.

  3. Change the font color to the same color as the sheet background. To do this, click the Color list on the Font tab, and select the background color.

  4. Click the Numbers tab. Create a custom number format that includes a color, as in the following examples:

          [BLACK]General
          [BLACK]$#,##0.00;[RED]$#,##0.00
    

  5. Click OK to return to your spreadsheet.

If you are using Microsoft Excel version 4.0 or earlier, follow these steps:

  1. Select the cells you want to format.

  2. On the Format menu, click Font.

  3. Change the font color to the same color as the sheet background. To do this, click the Color list on the Font tab, and select the background color.

  4. In the Font dialog box, click OK.

  5. On the Format menu, click Number. Create a custom number format that includes a color, as in the following examples:

          [BLACK]General
          [BLACK]$#,##0.00;[RED]$#,##0.00
    

  6. Click OK to return to your worksheet.

REFERENCES

For more information about creating custom number formats in Microsoft Excel version 7.0, click Answer Wizard on the Help menu, and type the following:

   custom number formats

"Microsoft Excel User's Guide 1," version 4.0, pages 220-227 "Microsoft Excel User's Guide," version 3.0, pages 184, 188-193


Additional query words: 1.50 2.20 3.00 4.00 5.00 7.00 hiding messages
#DIV/0! #NAME? #NULL! clear
Keywords : xlformula kberrmsg
Version : WINDOWS:3.0,4.0,5.0,7.0; MACINTOSH:1.0,2.0,3.0,4.0,5.0,98; os/2:3.0
Platform : MACINTOSH OS/2 WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.