Hide Zeros (or Show a Dash)

Excel Formulas › Advanced

All versionsFormatting

Zeros clutter a report. A custom number format can hide them entirely or replace them with a clean dash — without deleting the values or affecting the math.


Quick formula: Format Cells → Custom, leave the zero section empty:
#,##0;-#,##0;
Three sections with the third (zero) empty hides zeros. Use "–" in that section to show a dash instead.

Functions used (tap for the full reference guide):

The example

Zeros hidden so only real figures show.

AB
1ValueDisplays
21,2501,250
30(blank)

The formula

An empty third section hides zeros:

#,##0;-#,##0; (zero section empty → hidden) #,##0;-#,##0;"–" (zero shows a dash)

How it works

The zero section controls how zeros appear:

  1. Recall the sections: positive;negative;zero;text.
  2. Leave the zero section empty (just a trailing semicolon) to hide zeros.
  3. Or put "–" (or any text) in the zero section to show a placeholder instead.
  4. To hide zeros across the whole sheet, use File → Options → Advanced → uncheck “Show a zero in cells that have zero value.”

Hide everything with ;;; — three empty sections (;;;) hides positives, negatives, and zeros, leaving the cell visually blank while keeping its value. Handy for hiding helper cells without deleting them.

Try it: interactive demo

Live demo

Zeros hidden; pick “hide” or “dash”.

Displays:

Variations

Show a dash

Placeholder for zero:

#,##0;-#,##0;"–"

Hide everything

Blank the cell visually:

;;;

Formula alternative

Blank via IF:

=IF(A1=0, "", A1)

Pitfalls & errors

Value still there. Hidden zeros are still zeros — SUM and other formulas still count them. It’s display only.

Sheet-wide vs cell. The Options toggle hides zeros everywhere; the format code hides only formatted cells. Pick the scope you want.

;;; hides all. Three empty sections blank everything — useful, but don’t forget you applied it, or the cell looks empty when it isn’t.

Practice workbook

📊
Download the free Hide Zeros (or Show a Dash) practice workbook
Cells with zero-hiding and dash formats applied, the ;;; and IF variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I hide zeros in Excel without deleting them?
Use a custom format with an empty zero section, e.g. #,##0;-#,##0; (note the trailing semicolon). The zeros are hidden but the values remain for calculations.
How do I show a dash instead of zero?
Put a dash in the zero section: #,##0;-#,##0;"–".
How do I hide a value entirely?
Apply the format ;;; (three empty sections). The cell looks blank but keeps its value.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Custom number format · Conditional number format · Trap errors with IFERROR

Function references: IF