Excel text to appear on screen but not print

Excel text to appear on screen but not print

我正在 Excel 中创建一份合同,但我不想在打印时显示分项定价。将字体颜色更改为白色非常耗时,因此不是一种选择。隐藏单元格组会在打印时破坏工作表。有没有办法格式化单元格组,使文本显示在屏幕上,但在打印时不显示?

答案1

Use a cell (either out of the print range or on another sheet) to indicate if the price is shown. Then for all the cells that you want to hide, use the conditional formatting. If the cell is true, then show the prices, if the cell is false, then hide the prices. You would format one of the prices, then copy the format with the format painter.

答案2

You can use a macro to accomplish this using the BeforePrint to run a script to change the cells to white then AfterPrint to return them to the original color.

相关内容