Sub trimcol()
Dim r As Range
Set r = Intersect(Range(“C1”).EntireColumn, ActiveSheet.UsedRange)
r.Value = Evaluate(“IF(ROW(” & r.Address & “),IF(” & r.Address & “<>””””,TRIM(” & r.Address & “),””””))”)
End Sub
Sub trimcol()
Dim r As Range
Set r = Intersect(Range(“C1”).EntireColumn, ActiveSheet.UsedRange)
r.Value = Evaluate(“IF(ROW(” & r.Address & “),IF(” & r.Address & “<>””””,TRIM(” & r.Address & “),””””))”)
End Sub