Hide or display cell values

Applies To
Excel for Microsoft 365 Excel 2024 Excel 2021 Excel 2019 Excel 2016

Suppose you have a worksheet that contains confidential information, such as employee salaries, that you do not want a co-worker who stops by your desk to see. Or perhaps you multiply the values in a range of cells by the value in another cell that you do not want to be visible on the worksheet. By applying a custom number format, you can hide the values of those cells on the worksheet.

Note

Although cells with hidden values appear blank on the worksheet, their values remain displayed in the formula bar where you can work with them.

Hide cell values

  1. Select the cell or range of cells that contains values that you want to hide. For more information, see Select cells, ranges, rows, or columns on a worksheet.

    Note

    The selected cells will appear blank on the worksheet, but a value appears in the formula bar when you select one of the cells.

  2. On the Home tab, select the Number Format button  Button image  next to Number.
    Excel Ribbon Image

  3. In the Category box, select Custom.

  4. In the Type box, select the existing codes.

  5. Type ⁠;;;⁠ (three semicolons).

  6. Select OK.

Tip

To cancel a selection of cells, select any cell on the worksheet.

Display hidden cell values

  1. Select the cell or range of cells that contains values that are hidden. For more information, see Select cells, ranges, rows, or columns on a worksheet.
  2. On the Home tab, select the Number Format button Button image  next to Number.
    Excel Ribbon Image
  3. In the Category box, select General to apply the default number format, or select the date, time, or number format that you want.

Tip

To cancel a selection of cells, select any cell on the worksheet.