PDA

View Full Version : problems with removing double spaces



saban
01-18-2007, 03:15 AM
Any ideas how to remove duplicate(or even 3 or 4 spaces) spaces between word and replace them with one? cause find and replace function does not do the job

But the interesting thing is that find function does find double spaces but find and replace does not

Very strange
:(

Charlize
01-18-2007, 04:13 AM
Are they just spaces or special spaces. ctrl + shift and space is perhaps something different then just a space. Maybe use a macro to search for one space. Check character besides. If space remove it and so on. Do the same for hard spaces (when more than two spaces you'll have to loop. Perhaps loop until no more than one space is found).

Charlize

saban
01-18-2007, 05:51 AM
thnx for the tip will let you know how it worked

Bilby
01-18-2007, 01:32 PM
Have you looked at using Regular Expressions?

TonyJollans
01-18-2007, 03:30 PM
Find and Replace will do the job very easily. What have you tried?

saban
01-25-2007, 09:03 AM
I have tried that but it is very strange if I open just dialog window find
ctrl+f it will find double spaces but if I try with replace ctrl+H
No instances are found

Very strange

TonyJollans
01-25-2007, 11:53 AM
When it works with Ctrl+F, all you have to do is click the Replace tab and you're in the Ctrl+H Dialog with exactly the same Find. It just can't work in one and not the other - there must be something else different.

Charlize
01-26-2007, 03:13 AM
Take a look at this kb article : http://vbaexpress.com/kb/getarticle.php?kb_id=613

Removes unnecessary spaces.

Charlize