Excel Tutorial
Excel tutorials, quizzes & AI guides — all levels
RSS
  • Online Excel Exercises
  • Training
  • Excel Tests
  • Sitemap
  • Premium Quizzes
  • Shop
  • My account

Dash for a zero in Excel automatically

Conditional Formatting - Tips and Tricks
Reading time: 2 minutes
Views: 190,812

How to display a dash ( – ) instead of a zero in your Excel cells automatically in your format number

  1. Open the custom number format

    This is necessary to create you own custom format number in Excel

  2. Understand the way to create a custom code

    In Excel, a number can have 4 differents statement

  3. Change the 3rd argument

    To replace dash for a zero automatically, you must customize this argument

Don’t replace your zeros manually with a dash in Excel ⛔

This remark is very important. If you manually replace each 0 with a dash, you will create confusion between the text and numeric values ​​in the same column ☹️

  • A dash is considered as text
  • 0 is a number

For example, in this document, because of the dashes, Excel considers that not all the cells have a numeric value.

The COUNT function counts the number of numeric values. This is why you can see that the dashes are not included in the result.

Dash is a text and not a numeric value by default in Excel

How to display a dash automatically instead of a zero in Excel?

To display a dash instead of the number 0, you have to customize the format of your numbers.

  1. First, open the Format number dialog box
  2. Go to the Custom Category
Open Custom format number

How to customize the display of the numbers in Excel?

Excel offers 4 displays for numbers, in this order

  1. Display of positive numbers
  2. Display of negative numbers
  3. Number zero
  4. Text

Positive number;Negative number;0;Text

You also need to specify how the number will be displayed.

  • Use 0 to display all the 0 (important to keep the leading 0)
  • Use # to display the numbers except the 0 if not necessary

For instance, if you have the number 123

  • The code #### (4 #) will display 123 in your cell
  • The code 0000 (4 zeros) displays the value 0123
  • And with the code ###0.00 the display will be 123.00 (no leading 0 but 0 for the decimals 😉)

Replace the 0 by a dash in Excel

  • To change a zero to a dash, manipulate the 3rd argument of the number code.
  • Simply insert a dash enclosed in quotation marks as the 3rd parameter.
  • This adjustment will replace all zeros with dashes.

#,##0.00; [Red] – #,##0.00 ;”-“

Format code to display dash for 0

Zeros are now displayed with a dash and the COUNT function returns 8 numeric values ​​for each column 😀

The zeros are displayed with a dash in Excel

Related articles

  • Highlight the min and max values automatically
  • Display negative number in parenthesis
  • Free Excel Tests
  • Excel training online
  • Start Excel with your custom format number

Frédéric LE GUEN

Format number

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Viewed Posts

  • Displaying Negative Numbers in Parentheses in Excel (310,065)
  • Top 10 Excel Functions You Must Know (232,001)
  • How to make automatic calendar in Excel (212,775)
  • Dash for a zero in Excel automatically (190,812)
  • Converting a Date from YYYYMMDD to DD/MM/YYYY in Excel (171,033)
image excel exercises
Excel Exercises
image excel quizzes
Excel Quizzes

Dash for a zero in Excel automatically

Reading time: 2 minutes
Views: 190,812

How to display a dash ( – ) instead of a zero in your Excel cells automatically in your format number

  1. Open the custom number format

    This is necessary to create you own custom format number in Excel

  2. Understand the way to create a custom code

    In Excel, a number can have 4 differents statement

  3. Change the 3rd argument

    To replace dash for a zero automatically, you must customize this argument

Don’t replace your zeros manually with a dash in Excel ⛔

This remark is very important. If you manually replace each 0 with a dash, you will create confusion between the text and numeric values ​​in the same column ☹️

  • A dash is considered as text
  • 0 is a number

For example, in this document, because of the dashes, Excel considers that not all the cells have a numeric value.

The COUNT function counts the number of numeric values. This is why you can see that the dashes are not included in the result.

Dash is a text and not a numeric value by default in Excel

How to display a dash automatically instead of a zero in Excel?

To display a dash instead of the number 0, you have to customize the format of your numbers.

  1. First, open the Format number dialog box
  2. Go to the Custom Category
Open Custom format number

How to customize the display of the numbers in Excel?

Excel offers 4 displays for numbers, in this order

  1. Display of positive numbers
  2. Display of negative numbers
  3. Number zero
  4. Text

Positive number;Negative number;0;Text

You also need to specify how the number will be displayed.

  • Use 0 to display all the 0 (important to keep the leading 0)
  • Use # to display the numbers except the 0 if not necessary

For instance, if you have the number 123

  • The code #### (4 #) will display 123 in your cell
  • The code 0000 (4 zeros) displays the value 0123
  • And with the code ###0.00 the display will be 123.00 (no leading 0 but 0 for the decimals 😉)

Replace the 0 by a dash in Excel

  • To change a zero to a dash, manipulate the 3rd argument of the number code.
  • Simply insert a dash enclosed in quotation marks as the 3rd parameter.
  • This adjustment will replace all zeros with dashes.

#,##0.00; [Red] – #,##0.00 ;”-“

Format code to display dash for 0

Zeros are now displayed with a dash and the COUNT function returns 8 numeric values ​​for each column 😀

The zeros are displayed with a dash in Excel

Related articles

  • Highlight the min and max values automatically
  • Display negative number in parenthesis
  • Free Excel Tests
  • Excel training online
  • Start Excel with your custom format number
Tags: Format number

Frédéric LE GUEN

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net