Excel – How to prevent cells from printing in Excel

conditional formattingformattingmicrosoft excelprinting

How can I prevent the contents of specific cells (or entire row or column) from printing in Excel, while keeping them visible on the screen when I'm editing the file? Ideally I should be able to do this to cells in the interior of the spreadsheet (i.e., not just the rightmost column(s) or the bottom row(s)). Hiding row(s) or column(s) is not acceptable because I need to maintain the cell size, to maintain the overall appearance of the sheet.

I've looked for a way to define a conditional format that's conditional on whether Excel is currently printing, but there doesn't seem to be any such thing. I've been manually setting the text color to white before printing (and manually reverting it afterwards), but it seems there should be an automagic way of doing this.

Best Answer

You can apply normal (not conditional) formatting to achieve this. Select the cell, row, and/or column in question and go to "Format Cells", which is accessible through the ribbon ("Home" → "Cells" → "Format") or the keyboard shortcut Ctrl+1.

On the "Number" tab, select Category = "Custom" and for "Type" enter:

"";"";"";""

or simply

;;;

This tells Excel to display an empty string if the cell contains a positive number, negative number, zero or (non-numeric) text. So any value that is not an error will be hidden on the screen and when printed.

Related Question