Remove leading blank(s)
Sub TRIM_EXTRA_SPACES()
Dim Cell As Range
For Each Cell In Selection
If (Not IsEmpty(Cell)) And _
Not IsNumeric(Cell.Value) And _
InStr(Cell.Formula, "=") = 0 _
Then Cell.Value = Application.Trim(Cell.Value)
Next
End Sub
Gord Dibben MS Excel MVP
On Sat, 16 Aug 2008 14:56:02 -0700, GKW in GA
wrote:
How can I remove leading blanks from all cells in a selected column. I prefer
not to use a function because I prefer not to have to create another column.
Macro or FIND/Replace would be best if possible
|