Hiding Zeros

Worksheets are often cluttered with zeros as a result of calculations or information that hasn't been entered. Formulas frequently display a zero when referenced cells are blank. These zeros can make a worksheet confusing.

If you enter the sum formula in row 10 on the Detail sheet in the Sales workbook, the formulas produce unwanted values of zero (see Figure 9.5). This worksheet shows several columns where data has not been entered. Therefore, the cells with the formulas that total the empty columns produce zeros. In this case, you might want to suppress the zeros.

Figure 9.5. Formulas that produce unwanted values of zero.


There are a couple of ways to hide zeros in a worksheet:

  • Use the Tools, Options command to hide all values of zero in the worksheet. In the Options dialog box, click the View tab (see Figure 9.6). In the Window Options section, click the Zero Values check box to remove the check mark, which hides all zeros on the worksheet.

    Figure 9.6. Zero Values option in the Options dialog box.


  • Create a custom number format in the Format Cells dialog box to hide zeros in a range of cells.

The To Do exercise coming up walks you through hiding zeros in a range of cells on the worksheet. Use the Summary Sheet of the Sales workbook to see how it works.

To Do: Hide Zeros in a Range of Cells

  1. Select the range that contains the zeros you want to hide; in this case, select cells B10:D10.

  2. Choose Format, Cells. The Format Cells dialog box appears.

  3. Click the Number tab.

  4. In the Category list, click Custom.

  5. In the Type text box, the General category appears, which is the type you want. Click after the l in General and type a semicolon (;) followed by General and another semicolon (;) See Figure 9.7.

    Figure 9.7. Format Cells dialog box, hiding zeros.


  6. Click OK.

  7. Click any cell to deselect the range. The zeros are hidden in the selected range.

    Part I: Excel Basics