# Dash for a zero in Excel automatically

Last Updated on 31/03/2024
Reading time: 2 minutes

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.

## 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

## 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 ;"-"

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

# Dash for a zero in Excel automatically

Reading time: 2 minutes
Last Updated on 31/03/2024

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.

## 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

## 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 ;"-"

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

{"mobile_concate":{"mobile-menu":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/mobile-menu.css"},"tf_base":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/themify\/css\/base.min.css","v":"7.8.2"},"themify_common":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/themify\/css\/themify-common.css","v":"7.8.2"},"builder-styles-css":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/themify\/themify-builder\/css\/themify-builder-style.css","v":"7.8.2"},"tb_tbp":{"s":"https:\/\/excel-tutorial.com\/wp-content\/plugins\/themify-builder-pro\/public\/css\/tbp-style.css","v":"3.6.5"},"tf_theme_site-logo":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/styles\/modules\/site-logo.css","v":"7.5.7"},"tf_theme_site-description":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/styles\/modules\/site-description.css","v":"7.5.7"},"tf_search_form":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/themify\/css\/modules\/search-form.css","v":"7.8.2"},"tb_divider":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/themify\/themify-builder\/css\/modules\/divider.css","v":"7.8.2"},"tb_post-content":{"s":"https:\/\/excel-tutorial.com\/wp-content\/plugins\/themify-builder-pro\/public\/css\/modules\/post-content.css","v":"3.6.5"},"wp-block-library":{"s":"https:\/\/excel-tutorial.com\/wp-includes\/css\/dist\/block-library\/style.min.css","v":"6.6.2"},"tb_comments":{"s":"https:\/\/excel-tutorial.com\/wp-content\/plugins\/themify-builder-pro\/public\/css\/modules\/comments.css","v":"3.6.5"},"tb_image":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/themify\/themify-builder\/css\/modules\/image.css","v":"7.8.2"},"tb_image_top":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/themify\/themify-builder\/css\/modules\/image_styles\/top.css","v":"7.8.2"},"tb_text":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/themify\/themify-builder\/css\/modules\/text.css","v":"7.8.2"},"theme-style":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/style.css","v":"7.5.7"},"themify-media-queries":{"s":"https:\/\/excel-tutorial.com\/wp-content\/themes\/themify-infinite\/media-queries.css","v":"7.5.7","m":"(max-width:1200px)"}}