What if you need to add an invisible zero to a cell to make some other calculation work?
In this situation, the zero is not just a placeholder. It actually is part of the calculation and has to be there.
This post is mostly about the sophisticated workaround, but here’s the basic one first.
In most cases, you can add an invisible anything by making the color of the text match the color of the cell. In my case, I didn’t want to do this because the workbook used conditional formatting, and I’d have to match the colors in the formatting even when the formatting might change. Ugh.
The advanced trick is super easy.
- Type ALT H O E to get into the Format Cells dialog.
- Select the “Number” tab.
- Scroll to the bottom and select “Custom”.
- Into the text entry bar labeled “Type:” enter 3 semi-colons.
- Click OK.
Nothing will show in the cell because there is no value in there. But the cell will act as if there’s a zero there because of the custom formatting.
The only pitfall here is that if you do edit the cell to put a number in there, when you tap enter, the number will disappear. The cute thing is, it’s there and will work in the calculations. The workaround for this is to change the cell formatting back to something like “number”.