• IMPORTANT NOTICE: The Excelguru Help Forums will be permanently shut down on Friday, June 26, 2026.

    With AI taking a more prevalent role in answering user questions, the traffic to the Excelguru Help Forums has seen a sharp decrease in traffic over the past couple of years. We do not see this trend changing anytime in the near future. As such, continuing to run the forums is just no longer feasible, so we have made the difficult decision to close them down at the end of the month.

    We appreciate everyone who joined our forums to ask and answer questions over the past decade – and in particular – want to say a huge THANK YOU to the moderators and administrators who volunteered their time and expertise on a daily basis. You made the community what it was.

    NOTE: NEW USER ACCOUNTS CAN NO LONGER BE CREATED.

Automatically HIDING and UNHIDING ZEROS

dahowarduk

Member
Joined
Jul 15, 2012
Messages
44
Reaction score
0
Points
6
Location
UK
Excel Version(s)
2104
Can anyone show me how to :-
Set up an automated facility in Excel to NOT show a zero in cells that have a zero value, or later to then show a zero in cells.
i.e. the same reusable default ‘shortcut’ (for any spreadsheet) as an alternative to
FILE ~ OPTIONS ~ ADVANCED ~ but (DON’T) SHOW A ZERO IN CELLS THAT HAVE A ZERO VALUE
 
Thanks. But I want a macro or 'button'
 
Code:
Sub ToggleZeros()
ActiveWindow.DisplayZeros = Not ActiveWindow.DisplayZeros
End Sub
You could put it in personal.xlsb and create a link in the Quick Access Toolbar which will work as a toggle button in any workbook but on your computer only
or
put it into a standard code module (or the workbook code module) and create a button to run it, which will run only in that workbook.

1774654293812.png

Optionally use point 6 (Modify…) to change the symbol that appears in the QAT.
 
Last edited:
Thanks, but I'd need an idiot proof dummy's guide to step me through. I'm far too old to try without such a guide
 
Standard Module
How to install your new code
Copy the Excel VBA code
Select the workbook in which you want to store the Excel VBA code
Press Alt+F11 to open the Visual Basic Editor
Choose Insert > Module
Edit > Paste the macro into the module that appeared
Close the VBEditor
Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
 
Can I take it you're all sorted now?
 
Sorry, I would have been out of y comfort zone, so I gave up. Instead I created a new default template that includes zeros hidden
 
Back
Top