How to Fix Excel If Zero Doesn't Show
In this article
Yes, you can fix Excel if it is showing a dash or nothing instead of the value zero. This happens because Excel automatically hides zeros to keep spreadsheets tidy, but you can change this setting or force the zeros to appear using specific formatting options. The solution requires adjusting the "Show a zero in cells that have zero value" setting or using a custom number format.
What You'll Need
- A computer with Microsoft Excel installed (Windows or Mac).
- A spreadsheet file containing cells that should display zero but currently show dashes or spaces.
- A standard keyboard (optional, for keyboard shortcuts).
Step-by-Step
- Open Excel and navigate to the file that is displaying the issue. If you only want to change the setting for a specific sheet, open that sheet. If you want to change the setting for all new and existing files, proceed to step 2.
- Open the Excel Options menu. On Windows, click the File tab in the top-left corner and select Options from the menu. On a Mac, click Excel in the top menu bar and select Preferences.
- Access the Advanced settings. In the Excel Options window (Windows), click on the Advanced category in the left-hand sidebar. On the Mac, click on the View category.
- Locate the Display settings. Scroll down to the Display section. Look for the checkbox labeled Show a zero in cells that have zero value. This checkbox is usually near the bottom of the list of options.
- Check or Uncheck the box. If the box is unchecked, Excel is set to hide zeros. Check the box to enable the display of zeros. If the box is already checked and zeros are still not showing, proceed to step 6 to force the format manually.
- Apply the change. Click OK to save your changes and close the Excel Options window. Return to your spreadsheet. The cells should now display the number zero instead of a dash or blank space.
- If zeros still do not appear, force the format. If the global setting did not work, the cells might have a specific custom number format overriding the setting. Click on the cell or range of cells that should show zero. Press Ctrl + 1 on Windows or Cmd + 1 on Mac to open the Format Cells dialog box. Select the Number tab.
- Choose a format that includes zeros. On the left side, select Number or General. Ensure the decimal places are set to 0. Look at the options on the right. If you see 0 in the sample preview window, this format is correct. Click OK.
- Use a custom format to force visibility. If the standard formats are not working, you can create a custom format that guarantees a zero will be seen. In the Format Cells dialog box (still open), select Custom from the category list on the left. In the Type field at the top, delete any existing text. Type 0 and click OK. This format tells Excel to display exactly what is in the cell, even if it is zero.
- Check for Conditional Formatting. Sometimes, Conditional Formatting rules are applied to a range that hide zeros based on specific conditions. Go to the Home tab and look for the Conditional Formatting button on the ribbon. Select Clear Rules and then Clear Rules from Selected Cells to remove any rules that might be formatting the zero as invisible or changing its color.
Common Mistakes
One of the most common mistakes is assuming that the value in the cell is actually zero. Before adjusting settings, click on the cell and check the formula bar at the top of the window. If the cell displays a dash but the formula bar shows a negative number, Excel is displaying the sign of the number, not hiding the value. In this case, you need to adjust the number formatting to include negative numbers, not just zeros.
Another mistake is applying the fix to the wrong area. Users often check the box in the Advanced settings but forget that this setting might have been overridden by a specific Custom Format on their specific sheet or workbook. Always verify that the cells you want to edit are actually selected when you apply the manual format in step 7.
Tips
When working with financial data or accounting spreadsheets, it is often useful to format the entire sheet to show zeros. You can do this by selecting the specific columns or rows you want to monitor, rather than the entire worksheet, to avoid changing the format of headers or unrelated data.
If you are using Excel on a Mac, the menu path for the settings is slightly different. The option to show zeros is located under the View menu in Excel Preferences, rather than the Advanced menu. Ensure you are looking in the correct category to find the checkbox.
For users who prefer keyboard shortcuts, you can quickly toggle the visibility of zeros using a VBA macro. However, for most standard users, clicking the checkbox in the Excel Options menu is the fastest and most reliable method. It requires no coding knowledge and applies the change instantly.
Troubleshooting
If the checkbox is checked but zeros still appear as dashes: This usually indicates a specific formatting conflict. Select the cells in question and verify that they are not formatted as Text. If a cell is formatted as Text, Excel will not calculate the value as a number, and the zero formatting will not apply. You can fix this by changing the cell format back to General or Number, or by using the Text to Columns feature (Data tab > Text to Columns > Finish) to convert the data.
If zeros show up but you want them to remain hidden: If the goal was to keep the sheet clean and you have accidentally enabled the setting, simply uncheck the box in the Advanced settings. You can also use the custom format General. Excel will display the value if it is non-zero, but will leave the cell blank if the value is zero.
If the issue is with a specific formula: If a formula returns a zero value (result is 0) but you want to show a different placeholder, such as the word "Zero" or a dash, you can use the IF function. For example, =IF(A1=0, "Zero", A1) will display the word "Zero" when the result is zero. Alternatively, =IF(A1=0, "", A1) will keep the cell blank if the result is zero.
If the changes do not save: Ensure that you are saving your Excel file in a format that supports macros and custom settings, such as an .xlsx or .xlsm file. If you are saving as a .csv file (Comma Separated Values), the formatting settings will not be saved, and the file will revert to the default behavior when reopened.
Frequently Asked Questions
Why does Excel hide zeros by default?
Excel hides zeros to make large datasets easier to read and less cluttered. It was designed with accounting in mind, where a blank space is often used to indicate an empty or missing entry, rather than a literal value of zero.
Can I hide zeros only in specific columns?
Yes. You can apply a specific number format to a column or a range of cells. Select the cells, press Ctrl+1, and choose a format that does not explicitly display zero. Alternatively, you can use Conditional Formatting to hide zeros based on the value in the cell.
Does this setting apply to all new workbooks?
Yes, the setting in Excel Options applies to all current and future workbooks on that specific installation of Excel. Once you enable the display of zeros, it will remain active until you change it again.
How do I show a dash instead of a zero?
To display a dash (-) instead of a zero, select the cells, press Ctrl+1, go to the Custom category, and type 0;-0;. This tells Excel to display the number normally, display a dash for negative numbers, and display a dash for zero values.
Does this affect the actual data?
No. Changing the display settings does not alter the underlying value in the cell. The cell still contains the number zero; it is only the visual representation that has changed. Calculations performed on these cells will still work correctly.
Why do I see hyphens instead of zeros?
Hyphens usually appear when a cell is formatted as Text and contains a negative number. Excel displays the negative sign as a hyphen. To fix this, change the cell format to Number or General, which will allow Excel to recognize the sign and display the correct negative value.