h1

Word: Find and replace any number of spaces

September 13, 2010

Update March 2019: Although the method below works, there’s a quicker method that uses ^w instead of wildcards. See this blog post for details: https://cybertext.wordpress.com/2019/03/29/word-a-quick-way-to-replace-multiple-spaces-with-a-single-space/

*******

Big thanks go to the late Mike Starr for sharing this tip!

If you’re editing a document written by one or more authors who don’t have a lot of Word experience/knowledge, there’s a good chance you’ll come across instances of multiple spaces where there should only be one space. The authors might have used multiple spaces to force layout (instead of tabs, styles, tables etc.), or they may have pasted words from another source into the document thus adding an extra space or two where there should only be one space.

Your job is to clean up the document — including finding all those extra spaces and removing them.

There are several methods you can use to do this (see the list at the end of this post for alternative methods I’ve documented), but the best — and quickest — method is to use a wildcard search to find any number of consecutive spaces and replace them with one space.

Here’s how:

  1. Press Ctrl+H to open the Find and Replace dialog box.
  2. Click the More button to display the search options.
  3. Select the Use wildcards check box (this method won’t work unless this option is turned on).
  4. In the Find what field, press the spacebar once followed by {2,10}. (See the Notes below about these numbers.)
  5. In the Replace with field, press the spacebar once.
  6. Click Replace All.

NOTES:

  • You can use any numbers you like. The first number is the minimum number of spaces to find and replace and the second represents the maximum number of spaces to find and replace — 2,10 represents a minimum of two and a maximum of 10 consecutive spaces. If you legitimately use double spaces after a period, type {3,10} after the space instead, and if you know you’ve got long strings of spaces in the document, use a range such as {2,80}.
  • You can also use this method to find all instances of two or more spaces after a period and replace them with one space. For that you’d type . {2,5} (note the space immediately after the period) in the Find what field, and a period followed by a single space in the Replace with field, as shown in the screen shot below.

Other methods and related posts:

[Links last checked September 2010; thanks again to Mike Starr for sharing this very simple wildcard method!]

15 comments

  1. […] […]      by Word: Find and replace any number of spaces « CyberText Newsletter September 13, 2010 at 5:32 […]


  2. You can FIND and REPLACE multiple words in Multiple docs using simple software

    Download FREE from website TECHNOCOMSOLUTIONS.com


  3. Worked beautifully.. Thanks


  4. I know this is a really old posting…but thank you! Have been wondering if there was a way to do this.


  5. Thanks you for this. I was wondering if there was a way to do it.


  6. Note that you could also use ^w (token to represent “white space”) in Find & Replace:
    Find what=^w
    Replace with=single space
    Replace All

    Be aware that “white space” includes the tab character, so this will change one or more tabs to a single space as well. (If that is a problem, change tabs (^t) temporarily to something else first; then restore them afterwards.)


  7. You can omit the second number in {2,10} to find all two or more spaces. Just use {2,} to find any number of spaces (more than 2).



Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.