How to Highlight Blank Cells in Excel (4 Fruitful Ways)

In this article, we will discuss 4 different methods to highlight blank cells in Excel. We’ll use the following dataset of the names of some students in different standards to illustrate our methods.

Data set for Highlight Blank Cells in Excel

Method 1 – Highlight Blank Cells Using Conditional Formatting

We can use Conditional Formatting in different ways to highlight blank cells.

1.1  – Highlight All Blanks in a Range

We can highlight blank cells with Conditional Formatting by customizing the fill color.

Steps:

  • Select the range in which we will search for blanks and highlight them, by selecting the upper-left cell and pressing Ctrl+Shift+End.

Highlight Blank Cells Using Conditional Formatting

  • Go to the Home tab.
  • Click the Conditional Formatting option.
  • Select More Rules from Highlight Cells Rules.

Highlight Blank Cells Using Conditional Formatting

A new window named New Formatting Rule opens.

  • Choose Format only cells that contain as Rule Type.
  • Select Blanks as Format only cells with.
  • Click on Format.

Highlight Blank Cells Using Conditional Formatting

  • Select the color for the Fill field.
  • Click OK.

The Preview is displayed.

Highlight Blank Cells Using Conditional Formatting

  • Click OK.

The blank cells are highlighted in our chosen color.


1.2 – Highlight the Rows That Have Blank Cells (in a Specific Column)

Now we will highlight the rows that contain blank cells in a specific column using the ISBLANK function. If any cell of the specific column is blank, then that row will be highlighted.

Steps:

  • Select the whole dataset by selecting the upper-left cell, and then pressing Ctrl+Shift+End.

  • Go to the Home tab.
  • Select New Rule from the Conditional Formatting command.

Highlight Blank Cells Using Conditional Formatting

  • Choose the option Use a formula to determine which cells to format from the Rule Type.
  • Enter the following formula in the box indicated in the image below:
=ISBLANK($B5)
  • Click Format.

Highlight Blank Cells Using Conditional Formatting

  • Choose the desired color from the Fill tab.
  • Click OK.

Highlight Blank Cells Using Conditional Formatting

A Preview of the results is displayed.

  • Click OK to return the final result.

The 8th row is highlighted as cell B8 is blank.

An Alternative to ISBLANK:

We can also use the LEN function to perform this operation. We’ll modify the formula and change the color format to accomplish this.

The formula is as follows:

=LEN($B5)=0

Highlight Blank Cells Using Conditional Formatting

  • After inputting the formula, click OK.

The LEN function delivers the same result.


1.3 – Highlight the Rows That Have Blank Cells (in Any Column)

Now we will use the COUNTBLANK function with conditional formatting to highlight the rows that contain blank cells in any column.

Steps:

  • Enter the following formula as above:
=COUNTBLANK($B5:$D5)

Highlight Blank Cells Using Conditional Formatting

  • Set the Format field and check the output in the Preview window.

  • Click OK.

Highlight Blank Cells Using Conditional Formatting

The rows which contain a blank cell in any column are highlighted.

Remove Conditional Formatting for Blank Cells:

To remove the Conditional Formatting:

  • Select Clear Rules from the Conditional Formatting drop-down.
  • Clear rules from the Selected Cells or the Entire Sheet as required.

Highlight Blank Cells Using Conditional Formatting

Read More: How to Find Blank Cells in Excel


Method 2 – Using Go To Special to Select and Highlight Blank Cells

Steps:

  • Select the whole dataset.

  • Press F5 or Ctrl+G.

A new window named Go To will appear.

  • Select Special.

Select and Highlight Blank Cells with Go To Special

The Go To Special window opens.

  • Select Blanks.

Select and Highlight Blank Cells with Go To Special

  • Click OK.

The blank cells are marked.

Note:

  • This method selects entirely blank cells. Cells containing spaces, empty strings, and non-printing characters are not considered as blanks.
  • This is a one-time or static solution, meaning if we change the data, the changes will not be reflected.

Read More: How to Make Empty Cells Blank in Excel


Method 3 – Filter and Highlight Blank Cells in a Specific Column

The AutoFilter command can detect blank cells based on columns, but we’ll require a few more steps to highlight them afterwards.

Steps:

  • Select the headings of all the columns in the dataset.

  • Go to the Home tab.
  • From the Editing command, click Sort & Filter.
  • Select Filter.
  • Or simply press Ctrl+Shift+L.

Filter & Highlight Blank Cells in Specific Column

As indicated by the down-arrows next to the headings, the Filter option is activated.

  • Click the drop-down and select Blanks.

Filter & Highlight Blank Cells in Specific Column

  • Click OK.

Only the rows containing blank cells in Column B are showing. We can now highlight the blanks manually by filling in a color. Similarly, we can show and then highlight the blank cells in the other columns too.


Method 4 – Using VBA Macros to Highlight Blank Cells in Excel

For our last method, we will apply VBA codes to highlight blank cells in Excel, both for perfectly blank cells and for apparently blank cells that actually contain spaces or other invisible data.

4.1 – Highlighting Genuinely Blank Cells

Here is the dataset to which we will apply the VBA code:

Steps:

  • Go to the Developer tab.
  • Click on Macros.

Using VBA to Highlight Blank Cells in Excel

The Macro dialog box opens.

  • Enter the Macro name as Hightlight_Blank.
  • Click Create.

Using VBA to Highlight Blank Cells in Excel

The command window of VBA opens.

  • In it, enter the following VBA code:
Sub Highlight_Blank()
Dim Dataset As Range
Set Dataset = Range("B5:D9")
Dataset.SpecialCells(xlCellTypeBlanks).Interior.Color = RGB(255, 181, 106)
End Sub

Using VBA to Highlight Blank Cells in Excel

  • Press F5 to run the code.

The blank cells are highlighted.


4.2 – Ignoring the Cells with Empty Strings

Steps:

  • Modify the dataset by adding a space in a blank cell.

  • Create a new Macro named Highlight_Empty_String.
  • Click OK.

  • Enter the following in the VBA command module:
Sub Highlight_Empty_String()
Dim Dataset As Range
Set Dataset = Range("B5:D9")
For Each cell In Dataset
If cell.Text = "" Then
cell.Interior.Color = RGB(255, 181, 110)
Else
cell.Interior.ColorIndex = xlNone
End If
Next
End Sub

Using VBA to Highlight Blank Cells in Excel

  • Press F5 to run the code.

Using VBA to Highlight Blank Cells in Excel

The cell containing the space is not highlighted, while the rest of the blank cells are.


Download Practice Workbook


Related Articles


<< Go Back to Excel Cells | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Alok Paul
Alok Paul

Alok Paul has completed his B.Sc. in Electronics and Telecommunication Engineering from East West University. He has been working on the ExcelDemy project for more than 2 years. He has written 220+ articles and replied to numerous comments. He is experienced in Microsoft Office, especially in Excel. He also led some teams on Excel and VBA content development. He has a keen interest in Advanced Excel, Data analysis, Excel Pivot Table, Charts, and Dashboard. He loves to research... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo