I would like to find blank cells that contain a single space, then highlight all cells which have a single space.
Option Explicit
Sub blankWithSpace()
Dim rng As Variant
For Each rng In ActiveSheet.UsedRange
If rng.Value = " " Then
rng.Style = "Note"
End If
Next rng
End Sub
Here is the message I get when attempting to run:
This is the expectation:
Before running the macro
After running the macro
New contributor
kenchewy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.