You are on page 1of 1

Sub DoTrim() For Each cell In Selection.Cells If cell.

HasFormula = False Then cell = Trim(cell) End If Next End Sub Source: Stack Overflow

You might also like