LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Autocorrect to remove spaces


Hi,

I am looking at how to remove extra spaces, and have been thinking
about using Autocorrect.

I have been reading another thread which suggested;

For Each cell In Selection
cell.Value = WorksheetFunction.Trim(cell.Text)
Next

What I have been using is;

With Application.AutoCorrect
AddReplacement "Want", "Replace"
End With

Works well within a loop changing any "Replace" text with "Want".
Something I didn't get Substitute to do correctly within a loop.

What I can't get AutoCorrect to do though is work with spaces, so:

With Application.AutoCorrect
AddReplacement "", " "
End With

Would you expect it to do so?

Thanks in advance for any suggestions
Neil


--
StackemEvs
------------------------------------------------------------------------
StackemEvs's Profile: 1402
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=171754

Microsoft Office Help

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i remove spaces? Lion2004 Excel Discussion (Misc queries) 1 March 9th 07 11:57 AM
how do I remove leading spaces and leave the remianing spaces w Debi Excel Worksheet Functions 6 February 28th 07 03:29 PM
How do I remove spaces lovebaby Excel Discussion (Misc queries) 5 October 29th 05 02:08 PM
Remove Spaces Ronbo Excel Programming 3 March 9th 05 02:53 AM
Remove spaces Soniya Excel Programming 2 May 19th 04 12:54 PM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"