Thread: TRIM function
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
fitou_learn[_2_] fitou_learn[_2_] is offline
external usenet poster
 
Posts: 4
Default TRIM function

Many thanks Mike. It worked a treat!

"Mike H" wrote:

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

"fitou_learn" wrote:

Is it possible to trim an entire worksheet?