TRIM function

G

Guest

You could use a macro

Sub trimall()
Application.ScreenUpdating = False
Dim myRange As Range
Set myRange = Range("A1:D1000") '< Change to suit
For Each c In myRange
c.Select
c.Value = Trim(c.Value)
Next c
Application.ScreenUpdating = True
End Sub

Mike
 
G

Guest

Many thanks Mike. It worked a treat!

Mike H said:
You could use a macro

Sub trimall()
Application.ScreenUpdating = False
Dim myRange As Range
Set myRange = Range("A1:D1000") '< Change to suit
For Each c In myRange
c.Select
c.Value = Trim(c.Value)
Next c
Application.ScreenUpdating = True
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top