How to Fill Blank Cells with Color in Excel – 5 Methods

This is the sample dataset.

There are several blank cells in the dataset.


Method 1 – Using the Go to Special Command to Fill Blank Cells with Color

Steps:

  • Select the dataset. If it is too big, you can select a cell and press Ctrl+A’.

  • Go to the Home tab.
  • Click Find & Select in Editing.
  • Select Go to Special.

fill blank cells in excel with color

  • In Go to Special, select Blanks.

fill blank cells in excel with color

  • Click OK.

All blank cells will automatically be selected.

fill blank cells in excel with color

  • Go to the Home tab.
  • Select Fill in Font.

  • Select a fill color.

Blank cells are filled with color.

fill blank cells in excel with color

 

Read More: How to Fill Blank Cells with 0 in Excel


Method 2 – Fill Blank Cells with Color Using the Conditional Formatting in Excel

Steps:

  • Select the dataset. If it is too big, you can select a cell and press Ctrl+A’.

  • Go to the Home tab.
  • In Styles, click Conditional Formatting.
  • Select New Rule.

fill blank cells in excel with color

  • In New Formatting Rule, in Select a Rule Type, select Format only cells that contain.
  • Choose Blanks in Format only cells with.
  • Click Format.

fill blank cells in excel with color

  • In Format Cells, go to the Fill tab and select a color.

  • Click OK in Format Cells and New Formatting Rule. 

fill blank cells in excel with color


Method 3 – Fill Blank Cells with Color Using a Formula

Steps:

  • Select the dataset. If it is too big, you can select a cell and press Ctrl+A’.

  • Go to the Home tab.
  • In Styles, click Conditional Formatting.
  • Select New Rule.

fill blank cells in excel with color

  • In New Formatting Rule, in Select a Rule Type, select Use a formula to determine which cells to format.
  • In Format values where this formula is true, enter the following formula.

=ISBLANK(B4)

Tou can also use the following formula:

=LEN(B4)=0
  • Click Format.

fill blank cells in excel with color

  • In Format Cells, select a color in Fill.

  • Click OK in Format Cells and New Formatting Rule to save the changes. Blank cells will be filled with color.

fill blank cells in excel with color


Method 4 – Embedding a VBA to Fill Blank Cells with Color in Excel

Steps:

  • Go to the Developer tab and select Visual Basic in Code.

fill blank cells in excel with color

  • In the VBA window, select Insert and choose Module.

  • Enter the code.
Sub Fill_Blank_Cells()
Selection.SpecialCells(xlCellTypeBlanks).Interior.ColorIndex = 4
End Sub

The color index is selected as 4.

  • Save and close the VBA window.
  • To run the code, select the dataset.

  • Go to the Developer tab and select Macros in Code.

fill blank cells in excel with color

  • In the Macro box, select the code name (Fill_Blank_Cells).
  • Click Run.

fill blank cells in excel with color

Blank cells are filled with color.

fill blank cells in excel with color

Read More: How to Fill Blank Cells with Value Above in Excel VBA


Method 5 – Using VBA to Fill Blank (but Not Empty) Cells with Color

Steps:

  • Go to the Developer tab and select Visual Basic in Code.

fill blank cells in excel with color

  • In the VBA window, select Insert and choose Module.

  • Use the following code.
Sub Fill_Blank_Cells_2()

  Dim rnge As Range
  Set rnge = Selection

  For Each cell In rnge
    If cell.Text = "" Then
       cell.Interior.ColorIndex = 20
    Else
       cell.Interior.ColorIndex = xlNone
    End If
  Next

End Sub
  • Save and close the VBA window.
  • Select the dataset.

  • Go to the Developer tab and select Macros in Code.

fill blank cells in excel with color

  • Select the code: Fill_Blank_Cells_2 in Macro name.
  • Click Run.

fill blank cells in excel with color

Blank cells and all cells with a white space are filled with color.

fill blank cells in excel with color

 


Download Practice Workbook

Download the workbook.


Related Articles


<< Go Back to Fill Blank Cells | Excel Cells | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Abrar-ur-Rahman Niloy
Abrar-ur-Rahman Niloy

Abrar-ur-Rahman Niloy, holding a B.Sc. in Naval Architecture and Marine Engineering, has contributed to Exceldemy for nearly 1.5 years. As a leader in Excel, VBA, and Content Development teams, he authored 114+ articles and assisted the Exceldemy forum. Presently, as a project writer, he prioritizes stepping out of his comfort zone, aiming for constant technical improvement. Niloy's interests encompass Excel & VBA, Pivot Table, Power Query, Python, Data Analysis, and Machine Learning libraries, showcasing his commitment to diverse... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo