How to Highlight Cells in Excel but Not Print (2 Simple Ways)

Get FREE Advanced Excel Exercises with Solutions!

Sometimes, we highlight cells in Excel depending on values or specific conditions by using some Fill Colors. But when printing we do not want these cells to be highlighted. Here, you will find 2 ways to highlight cells in Excel but not print.


Download Practice Workbook


2 Ways to Highlight Cells in Excel but Not Print

Here, we have a dataset containing the Student ID, Name, and Scores of some students. Now, we will highlight the top 2 and bottom 2 scores by using Conditional Formatting.

Ways to Highlight Cells in Excel But Not Print

Here are the steps.

Steps:

  • Firstly, select Cell range D5:D11.
  • Then, go to the Home tab >> click on Conditional Formatting >> click on Top/Bottom Rules >> select Top 10 Items.

Using Conditional Formatting to Highlight Cells in Excel but Not Print

  • Now, the Top 10 Items box will open.
  • After that, select 2 as the number of Cells to be formatted with Green Fill with Dark Green Text.
  • Next, click on OK.

  • Again, select Cell range D5:D11.
  • Then, go to the Home tab >> click on Conditional Formatting >> click on Top/Bottom Rules >> select Bottom 10 Items.

  • Now, the Bottom 10 Items box will open.
  • After that, select 2 as the number of Cells to be formatted with Light Red Fill with Dark Red Text.
  • Next, click on OK.

  • Thus, we have highlighted the top 2 and bottom 2 scores.

Now, we will show how you can print this dataset without highlighting these cells using the Page Setup Feature and VBA.


1. Use of Page Setup Feature to Highlight Cells but Not Print

In the first method, we will show you how to highlight cells in Excel but not print using the Page Setup Feature. Go through the steps given below to do it on your own dataset.

Steps:

  • In the beginning, go to the Page Layout tab >> click on the Page Setup button.

Use of Page Setup Feature to Highlight Cells but Not Print

  • Now, the Page Setup box will appear.
  • Then, go to the Sheet tab >> turn on Black and white from the Print options.
  • After that, click on OK.

Opening Page Setup Box to Highlight Cells in Excel But Not Print

  • Finally, if you print the Excel file the Cells will not be highlighted. You can also check this in preview before printing.

Read More: How to Highlight Blank Cells with Conditional Formatting in Excel


2. Using VBA to Highlight Cells in Excel but Not Print

Now, we will show you how to highlight cells in Excel but not print using VBA. Follow the steps given below to do it on your own dataset.

Steps:

  • Firstly, go to the Developer tab >> click on Visual Basic.

Using VBA to Highlight Cells in Excel but Not Print

  • Now, the Microsoft Visual Basic for Applications box will open.
  • Then, double-click on ThisWorkbook.

Opening Microsoft Visual Basic for Applications Box to Highlight Cells in Excel But Not Print

  • After that, insert the following code in ThisWorkbook.

Code Breakdown

  • Firstly, we selected Workbook from General and BeforePrint from Declarations as an event to execute the code before printing.
  • Then, we set EnableEvents of the Application as False.
  • Next, we set Cancel as True.
  • After that, we set the PageSetup as BlackAndWhite for the ActiveSheet.
  • Then, we call for the Printout of the ActiveSheet.
  • Afterward, we set BlackAndWhite from PageSetup as False.
  • Finally, we set EnableEvents of the Application as True.
  • Next, click on the Save button to save the code and go back to your worksheet.

  • Finally, if you print the Excel file the Cells will not be highlighted. But you cannot check this in preview before printing.

How to Highlight Cells in Excel But Not Print Using VBA

Read More: How to Highlight Blank Cells in Excel VBA (6 Suitable Examples)


Practice Section

In this section, we are giving you the dataset in an additional worksheet to practice on your own and learn to use these methods.

Practice Section


Conclusion

So, in this article, you will find 2 ways to highlight cells in Excel but not print. Use any of these ways to accomplish the result in this regard. Hope you find this article helpful and informative. Feel free to comment if something seems difficult to understand. Let us know any other approaches which we might have missed here. And, visit ExcelDemy for many more articles like this. Thank you!


Related Articles

Arin Islam

Arin Islam

Hello, I'm Arin. I graduated from Khulna University of Engineering and Technology (KUET) from the Department of Civil Engineering. I am passionate about learning new things and increasing my data analysis knowledge as well as critical thinking. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to it.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo