Thread: Cleaning Text
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Cleaning Text

No, you have to loop

Dim cell as Range
On Error Resume Next
for each cell in
Activesheet.UsedRange.specialCells(xlconstants,xlT extValues)
cell.Value = Application.Clean(application.Trim(cell))
Next
On Error goto 0
--
Regards,
Tom Ogilvy

"James" wrote in message
...
Hi All

Is it possible to Clean up the whole sheet at once.
i.e Apply TRIM & CLEAN function to all cells to get rid of
obious mess.
Also to Clean are internal spaces i.e Some cells might
have more then one space beween the values
e.g "Joe Doe Bill" to make it "Joe Doe Bill" with
one space only

Thanks you guys

James