Hide Error Cells When Printing
October 03, 2023 - by Bill Jelen
Problem: I have a formula that does division. Occasionally, the divisor cell is zero, so I have a couple of #DIV/0!
value errors. I need to print this sheet without the errors to get the report to a staff meeting. I don’t have time to rewrite all the formulas to test whether the divisor is zero. What can I do?
Strategy: From the Page Layout tab, you can select the dialog launcher at the bottom right corner of the Page Setup group. In the Page Setup dialog, you go to the Sheet tab, select the dropdown for (Print) Cell Errors As, and select <blank>.
Results: Although the error will still appear in the worksheet, when you print, the error cells will print as blanks.
Alternate Strategy: The ultimate way to solve this problem is to change the formula to test whether the divisor is zero. In this case, a proper formula would be =IFERROR(B2/C2,0)
.
This article is an excerpt from Power Excel With MrExcel