That macro will try to clean up the usedrange when there really isn't anything
in the cell. Like it's been used, and then cleared.
But in your case with the spaces in there, you could clean them up and then run
the other macro:
Option Explicit
Sub testme()
Dim myRng As Range
Dim myCell As Range
With ActiveSheet
On Error Resume Next
Set myRng = .Cells.SpecialCells(xlCellTypeConstants, xlTextValues)
On Error GoTo 0
If myRng Is Nothing Then
'do nothing
Else
For Each myCell In myRng.Cells
If Trim(myCell.Value) = "" Then
myCell.ClearContents
End If
Next myCell
End If
End With
End Sub
But as much as I hate seeing people type a spacebar into a cell (to clear it??),
I'd be careful. Maybe there's a reason that they did it.
On the other hand, if I inherit a workbook that's filled with them, I clean them
with no compunction. (ooh. Compunction.)