Macro to Trim Spaces on a Selection of Cells
[breadcrumb]
Ever have to Remove the Extra Spaces in a range of cells, but you don’t want to create an extra column and use the trim formula. Here’s an easy Macro that will get the job done.
Sub TrimExample1()
Dim Rng As RangeSet Rng = Selection
For Each Cell In Rng
Cell.Value = Trim(Cell)
Next Cell
End Sub