Sometimes, you will have a dataset that has zero values in it. While some times these are actual values that you want to keep as is, in some cases you may want to hide these zero values in Google Sheets.
In this tutorial, I will show you a few methods that you can use to hide zero values in Google Sheets. I will also cover a method you can use to not just hide the zero values but instead remove these completely.
Table of Contents
Hide Zero Values using Conditional Formatting
Conditional formatting is the way you can format a cell based on the value in it.
And in our example, we will check all the cells that have zero value in it and then use conditional formatting to hide these 0s (by changing the font color of these cells).
Suppose you have a dataset as shown below and you want to hide all the zero values in this dataset.
Below are the steps to use conditional formatting to change the font color and hide these zero values:
- Select the entire dataset (A1:E13 in this example)
- Click the Format option in the menu
- Click on Conditional Formatting. This will also open the Conditional Formatting pane in the right side of the worksheet
- In the ‘Conditional Formatting Rules’ pane, click on ‘Format cells if’ drop-down.
- Click on ‘Is equal to’ option (you may have to scroll a bit to see this option in the list)
- In the field below the ‘Is equal to’ selection, enter 0
- In the Formatting style options, change the font color and cell fill color to white.
- Click on Done
The above steps would hide all the zero values and the cells would appear blank.
Remember, the cells just look blank, but these are not blank. These cells still have the zero values (as we have not removed the zero values, only changed the color to make the cells look blank).
Hide Zero Values using Custom Formatting
The above conditional formatting method works great when you have the same color for both cell color and the cell font color.
But as I mentioned in the section above, it doesn’t hide the zero values, it only gives an impression that these are hidden.
In case you truly want to hide these values, use the method covered in this section.
Suppose you have a dataset as shown below and you want to hide all the zero values in this dataset.
Below are the steps to hide the zero values using custom formatting in Google Sheets:
- Select the entire dataset (A1:E13 in this example)
- Click the Format option in the menu
- In the options that appear, go to Number –> More Formats –> Custom number format. This will open the ‘Custom number formats’ dialog box.
- In the Custom number formats dialog box, enter the following format: 0;-0;;@
- Click on the Apply button.
The above steps would hide all the zero values, while all the other cells remain unaffected.
Explanation of the custom format:
In the steps above, we have used the following format:
0;-0;;@
The custom format in Google Sheets is divided into four parts:
Positive Numbers; Negative Numbers; Zeros; Text
For each of these formats, you can specify how you want the cell to display the value. In this example, I have specified the following:
- Positive Numbers: These should look as is and is specified by using the 0
- Negative Numbers: These should be displayed with a negative sign at the beginning
- Zeroes: These should be hidden as we have left the format empty (haven’t specified any format)
- Text: Show the text as is and is specified by using the @ symbol
Important Note: When you hide a zero value in a cell using the methods shown in this tutorial, it only hides the value and not remove it. This means that while the cell may look as if it’s empty, the 0 value is still in the cell, and in case you use these cells for any calculation, these zero values will be used as well.
Find and Remove Zero Values in Google Sheets
The above two methods will hide the zero values in Google Sheets, but the value would still be in the cells. It would just appear that the cells are blank.
In case you want to remove the zero values (so that the cells are actually empty), use the steps covered in this section.
Suppose you have a dataset as shown below and you want to remove all the zero values in this dataset.
Below are the steps that will find all the cells with the zero values and then remove these:
- Select the entire dataset (A1:E13 in this example)
- Click the Edit option in the menu
- Click on Find and Replace option. This will open the Find and Replace dialog box (you can also use the keyboard shortcut Control + H)
- In the Find and Replace dialog box, enter 0 in the ‘Find’ field and leave the ‘Replace with’ field empty.
- Check the option, ‘Match entire cell contents’.
- Click on Replace All.
- Click on Done
The above steps would replace all the cells that have zero values with blanks.
You may also like the following Google Sheets tutorials: