I want to select all blank cells in on a worksheet and color then white. I tried using the code included below on a new blank worksheet but it returned an error saying that no cells were returned. Am I misunderstanding how .SpecialCells(xlCellTypeBlanks) works?
Code:
Dim colRng As Range
ActiveSheet.Cells.Select
Set colRng = Selection.SpecialCells(xlCellTypeBlanks)
With colRng.Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
End Sub
Last edited: