How to Apply Conditional Formatting to Blank Cells in Excel – 2 Methods

This is an overview:

Applying Conditional Formatting for Blank Cells


This is the sample dataset.

Dataset for Applying Conditional Formatting for Blank Cells in Excel

 


Method 1 – Using the Conditional Formatting Command 

This is the Conditional Formatting command:

Conditioning Formatting Option in Excel

 

1.1 Use the Built-in Formatting Rule in the Conditional Formatting Option

Steps

  • Select the entire dataset. Here, C5:E11.

Selecting Range of Cells from Dataset

  • In the Home tab, go to Conditional Formatting >> New Rule.

Inserting Conditional Formatting from Home Tab in Excel

  • In New Formatting Rule, select Format only cells that contain.

Selecting New Formatting Rule Type to Apply Conditional Formatting

  • Select Blanks.

Applying Build-in Conditional Formatting in Blank Cells

  • Click Format.

Clicking Format to Apply Formatting

  • Select Fill.
  • Choose a color and click OK.

Selecting Color of Blank Cells

Formatting is set.

Confirming Conditional Formatting of Blank Cells in Excel

  • Click OK.

Result after Using Built-in Formatting Rule from Conditional Formatting Option in Blank Cells

 


1.2 Apply Conditional Formatting using a Formula

Steps

  • Select the entire dataset. Here, C5:E11.

Selecting Range of Cells from Dataset

  • In the Home tab, go to Conditional Formatting >> New Rule.

Inserting New Rule to Conditional Formatting

  • In New Formatting Rule, select Use a formula to determine which cells to format.
  • Enter the following formula:
=ISBLANK(C5)=TRUE

Inserting Formula to Apply Conditioning Formula

  • Click Format.
  • Select Fill.
  • Choose a color and click OK.

Selecting Color for Blank Cells

Formatting is set.

Confirming Conditional Formatting for Blank Cells in Excel

  • Click OK.

Result after Applying Conditional Formatting with Formula Option in Blank Cells

 

Read More: Conditional Formatting If Cell is Not Blank


Method 2 – Using a VBA Code to Apply Conditional Formatting to Blank Cells

Steps

  • Press Alt+F11 to open the VBA editor.
  • Select Insert >> Module.

Inserting Module to Write VBA Code

  • Use the following code in the module:
Sub format_blank_cells()
Dim range_of_cells As Range
Set range_of_cells = Selection
range_of_cells.SpecialCells(xlCellTypeBlanks).Interior.Color = vbBlue
End Sub
  • Save the file.
  • Select C5:E11.

Selecting Range of Cells from Dataset

  • Press Alt+F8 to open the Macro dialog box.
  • Select format_blank_cells.

Running VBA Code to Apply Conditional Formatting

  • Click Run.

Result after Running VBA Code to Apply Conditional Formatting for Blank Cells

 

Read More: Apply Conditional Formatting to Each Row Individually


Skip Conditional Formatting for Blank Cells in Excel

 

Dataset for Skipping Conditional Formatting for Blank Cells in Excel

Conditional formatting was used to highlight cells with values less than 3000 in the Salary column. Blank cells were also formatted.

 Steps

  • Select E5:E11.

Selecting Range of Cells from Dataset

  • In the Home tab, go to Conditional Formatting >> New Rule.
  • Choose one of the previous methods to format blank cells.

Inserting Formatting Rule in Conditional Formatting OptionInserting Another Formatting Rule for Blank Cells

  • In the Home tab, go to Conditional Formatting >> Manage Rules.

Managing Rules for Skipping Conditional Formatting

  • In the Conditional Formatting Rules Manager window, check the boxes shown below.

Managing Rules for Skipping Conditional Formatting for Blank Cells

  • Click OK.

Result after Skipping Conditional Formatting for Blank Cells in Excel

 

Read More: How to Remove Conditional Formatting but Keep the Format in Excel


How to Undo Conditional Formatting in Blank Cells in Excel

1. Use the Quick Analysis option

Steps

  • Select the cell range.
  • Click the Quick Analysis option at the right bottom corner.
  • Select Clear Rules.

It will remove conditional formatting from blank cells.

Clearing Rules of Applied Conditional Formatting on Dataset Using Quick Analysis

2. Using the Conditional Formatting Command

  • Go to Conditional Formatting  >> Clear Rules.
  • Choose an option.

Clearing Rules of Applied Conditional Formatting in Blank Cells in Excel


 

Download Practice Workbook

Download the practice workbook


Related Articles

<< Go Back to Conditional Formatting | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
A.N.M. Mohaimen Shanto
A.N.M. Mohaimen Shanto

A.N.M. Mohaimen Shanto, a B.Sc. in Computer Science and Engineering from Daffodil International University, boasts two years of experience as a Project Manager at Exceldemy. He authored 90+ articles and led teams as a Team Leader, meticulously reviewing over a thousand articles. Currently, he focuses on enhancing article quality. His passion lies in Excel VBA, Data Science, and SEO, where he enjoys simplifying complex ideas to facilitate learning and growth. His journey mirrors Exceldemy's dedication to excellence and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo