Display or hide formulas

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

You can control the display of formulas in the following ways:

Switch between displaying formulas and their results from the ribbon

Show Formulas in desktop

Select Formulas and then select Show Formulas to switch between displaying formulas and results.

Switch between displaying formulas and their results from the keyboard

Press CTRL + ` (grave accent).

Prevent a formula from displaying in the formula bar

Note

This procedure also prevents the cells that contain the formula from being edited.

  1. Select the range of cells whose formulas you want to hide. You can also select nonadjacent ranges or the entire sheet.
  2. Select Home > Format > Format Cells.
  3. On the Protection tab, select the Hidden check box.
  4. Select OK.
  5. Select Review > Protect Sheet.
  6. Make sure the Protect worksheet and contents of locked cells check box is selected, and then select OK.

Show formulas that were previously hidden by removing protection

Select the Review tab, and then select Unprotect Sheet. If the Unprotect Sheet button is unavailable, turn off the Shared Workbook feature first.

If you don't want the formulas hidden when the sheet is protected in the future, right-click the cells, and select Format Cells. On the Protection tab, clear the Hidden check box.