A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
I use this macro to "clean up" blank cells. It replaces clears all cells within the selected range that contain an empty string "" after replacing non-breaking spaces with ordinary spaces and trimming leading/trailing spaces. If there are formulas within the selection that result in an empty string, they will be removed.
Sub ClearBlanks()
Dim oCell As Range
On Error GoTo ExitHandler
Application.ScreenUpdating = False
For Each oCell In Selection
If Trim(Replace(oCell.Value, Chr(160), " ")) = "" Then
oCell.ClearContents
End If
Next oCell
ExitHandler:
Application.ScreenUpdating = True
End Sub