How to Hide Cell Contents in Excel

Learn how to hide cells in Excel with a custom format, conceal entire rows or columns, and restore the display without deleting your data.

Contents

Don't Miss the Good Stuff

Get tech news that matters delivered to your inbox.

To hide cell contents in Excel, select the cells, open Format Cells, choose Custom, enter ;;; in Type, and select OK. This makes the selected cells look blank while keeping their values available for calculations. On Windows, press Ctrl + 1 to open the formatting dialog.

You cannot collapse an individual cell independently of its row or column. You can hide its displayed contents, hide its entire row or column, or hide a formula from the formula bar. The steps below cover Excel for Microsoft 365 and Excel 2024, with browser and phone alternatives where the controls differ.

The short version

  • Keep cells in place: Apply the custom format ;;; to hide their displayed contents without deleting their values.
  • Restore the display: Apply General or another suitable number format to reveal the contents again.
  • Hide whole sections: Select row numbers or column letters, right-click the selection, and choose Hide.
  • Protect private information: Formatting and worksheet protection do not make sensitive cell contents secure.

MethodWhat changesMain limitation
Custom format ;;;Selected cells look blankContents remain accessible in the formula bar
Matching font and background colorsCell text blends into its backgroundSelection, editing, or copying can reveal it
Custom format 0;-0;;@Zeros in selected cells look blankShows other numbers rounded to whole numbers
Zero display settingZeros disappear across the worksheetDoes not target an individual range
Row or column hidingEntire rows or columns disappear from viewAlso hides other cells in those rows or columns
Hidden with sheet protectionFormulas disappear from the formula barFormula results remain visible
Turn off Show FormulasCalculated results replace formula text in cellsFormulas remain available for inspection
Print areaOnly the selected area printsExcluded cells remain accessible in the workbook
Clear contents in a separate copySelected values and formulas are removed from that copyDependent calculations can change

Hide selected cell contents on Windows

Select the cells you want to make blank, then press Ctrl + 1. Alternatively, select Home > Format > Format Cells. Open the Number tab and choose Custom.

Replace the contents of Type with ;;;, then select OK. The selected cells keep their places in the worksheet, but their contents disappear from the grid. Your formulas can continue using those values.

Selecting one of these cells still exposes its contents in the formula bar. Use this method when you want a less cluttered worksheet and the data can remain accessible. To reveal the contents again, select the cells, reopen Format Cells, and apply General or another number format suited to their contents.

Apply the hiding format on a Mac

On a Mac, select the cells and open Home > Number Format > More Number Formats. In Format Cells, choose Custom under Category. Replace the contents of Type with ;;; and select OK.

Your selected cells now look blank, but their contents remain accessible and available for calculations. To bring the contents back, return to the number format controls and apply General or another appropriate format.

Hide contents in the browser or phone app

Excel for the web cannot create custom number formats through its standard formatting interface. With an installed, licensed desktop copy of Excel, select Open in Excel from your browser workbook. Apply the custom format in the desktop app using the Windows or Mac steps above, then save the workbook.

For a visual alternative in the browser, select the cells and choose Home > Font Color. Choose the same color as the cell background, such as white text on a white background. You can also set a matching background through Home > Fill Color. These color controls are also available in desktop Excel for Windows and Mac.

On your phone, select the cells, then tap Show ribbon on an iPhone or More options on an Android phone. Open the tab menu, select Home > Font Color, and choose the background color. Matching colors only conceals the displayed text visually, and selecting, editing, or copying the cells can reveal their contents.

Hide only zero values

When zeros are the only values you want to conceal, use a format that leaves other numbers and text visible. Select the cells and, on Windows, press Ctrl + 1, then choose Number > Custom. On a Mac, open Home > Number Format > More Number Formats and choose Custom.

Enter 0;-0;;@ in Type and select OK. Zero values appear blank and text stays visible, but this code also rounds other numbers to whole numbers in the cell. To keep two decimal places, add a decimal point and two zeros after each 0 in the code, or use the worksheet setting below, which hides zeros across the whole sheet without changing other numbers. Apply General or another number format when you want the zeros visible again.

To hide zeros throughout a worksheet on Windows, open File > Options > Advanced. Under Display options for this worksheet, choose the worksheet, uncheck Show a zero in cells that have zero value, and select OK. On a Mac, open Excel > Preferences > View and, under Show in workbook, uncheck Zero values.

Hide entire rows or columns

Select the row numbers or column letters for the area you want to conceal. Right-click the selected headers and choose Hide. This removes the entire rows or columns from view, including cells outside the smaller range you may have wanted to hide.

For a keyboard shortcut on desktop Excel or Excel for the web, select cells in the target rows and press Ctrl + 9. To hide entire columns in Excel, select cells in those columns and press Ctrl + 0. These shortcuts assume a US keyboard layout.

When a browser intercepts a shortcut, select Help > Keyboard Shortcuts, select Override browser shortcuts, and select Close. To unhide hidden columns in Excel, select the adjacent visible column headers, right-click, and choose Unhide. The same adjacent-header method restores hidden rows.

Hide formulas from the formula bar

The custom hiding format does not conceal formulas from the formula bar. On Windows, select the formula cells and open Home > Format > Format Cells > Protection. Check Hidden and select OK.

Next, select Review > Protect Sheet. Check Protect worksheet and contents of locked cells and select OK. If you add a password, enter and confirm it in the protection dialogs. The Hidden setting takes effect when you protect the sheet.

On a Mac, select the formula cells and open Format > Cells > Protection. Check Hidden, select OK, then choose Review > Protect Sheet. Optionally enter a password, repeat it under Verify, and select OK. Your formula results remain visible in the cells.

Fix formula text appearing in cells

If formulas are showing across your worksheet, select Formulas > Show Formulas on Windows or in the browser to switch back to calculated results. This changes what you see in the worksheet cells. It does not prevent someone from inspecting the formulas.

Keep unwanted cells out of a printout

For a Windows workbook that only needs certain cells printed, select the cells you want to include. Choose Page Layout > Print Area > Set Print Area to set a print area in Excel. Save the workbook to retain that selection.

Open File > Print to review the output before printing. Cells outside the print area remain visible and accessible in the workbook, so use this option when you only need to control the printed output.

Remove sensitive contents before sharing

Formatting, hidden rows, and hidden columns preserve the underlying data. Microsoft says worksheet protection is not a security feature. Before sharing a workbook, remove any contents the recipient should not be able to access.

On Windows, create a separate copy of the workbook before removing anything. In that copy, select the sensitive cells and choose Home > Clear > Clear Contents, or press Delete. Choose Clear All instead when you also need to remove formatting and comments.

Save the copy after making your changes. Clearing cells removes values and formulas, which can change calculations that depend on them. Review those results before distributing the file.

Frequently Asked Questions

Can you hide an entire worksheet in Excel?

Yes, right-click the worksheet tab and select Hide on Windows, Mac, or Excel for the web. To restore it, right-click a visible tab, select Unhide, choose the hidden sheet, and select OK.

Can Excel show a blank result instead of a formula error?

Enter =IFERROR(A2/B2,"") and press Enter to return an empty string when that calculation produces an error. This changes the returned result instead of merely hiding the error text with formatting. It suppresses all error types handled by IFERROR.

Can you show only the last four digits of a number?

For an identifier in B2, enter =CONCATENATE("***-**-",RIGHT(B2,4)) in another cell. The formula creates a masked output while leaving the original identifier intact. Hide the original data column separately if you want it out of view, but remember that it still contains the full identifier.

Can you hide rows temporarily with a collapse button?

Yes, grouping lets you collapse and restore detail in Excel for Windows and Excel for the web. Select the detail rows, choose Data > Outline > Group > Group, and choose Rows when prompted. Select the group's minus button to hide the detail and its plus button to restore it.

Share