Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Replacing Multiple Spaces with Tabs.

Replacing Multiple Spaces with Tabs

Written by Allen Wyatt (last updated February 15, 2020)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


10

You may receive a document from someone that uses multiple spaces to separate items on a line. This is typically done when a person wants to format tabular material, and separates columns using spaces. You can find this quite a bit in information downloaded from the Web.

If you are starting with a source document in this condition, you may be wondering how you can replace all the consecutive spaces with a single tab character. It is possible to go through multiple search-and-replace operations to achieve the desired goal, but there is a quicker way. You can replace any number of consecutive spaces with a single tab character by following these steps:

  1. Press Ctrl+H. Word displays the Replace tab of the Find and Replace dialog box.
  2. Click on the More button if it is available. (See Figure 1.)
  3. Figure 1. The Replace tab of the Find and Replace dialog box.

  4. In the Find What box, enter a single space followed by the characters {2,}. (Type only the left brace, the number 2, the comma, and the right brace.)
  5. In the Replace With box, type ^t.
  6. Make sure the Use Wildcards check box is selected.
  7. Click on Replace All.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (12741) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Replacing Multiple Spaces with Tabs.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Using the Reviewing Toolbar

The Reviewing toolbar is a handy location for many of the tools often used by editors when working on a document. Here's ...

Discover More

Running a Macro when a Worksheet is Activated

Want to run a macro when you first select a worksheet? You can do so by using one of the event handlers built into Excel, ...

Discover More

Managing Corporate Templates

Templates are used to store styles and lots of other customizations that affect how you use Word. On a single-user ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (ribbon)

Changing Formatting for a Portion of Found Text

The Find and Replace capabilities of Word are quite powerful. If you want to change the formatting of just a part of text ...

Discover More

Finding and Replacing when Only a Portion of the Text is Superscripted

Finding and replacing text when the text being searched for has mixed formatting can be a challenge. You may, however, ...

Discover More

Changing Decimal Commas to Decimal Points

If you have a document that was produced in a country where decimal commas are used instead of decimal points, you may be ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two more than 7?

2022-01-05 07:37:47

Krasimir Paskulov

Allen,
It obviously doesn't have anything to do with the word version, but with Regional settings, rather.
List separator - it's ; here.


2022-01-05 05:11:51

Krasimir Paskulov

Allen,
Hahaha, I wish I could take back my previous message.
I tried one more time with space+{2;} instead of {2,}, and this time it worked. For some reason this is the correct function to use in my version of word. Otherwise, in the Special pop-up menu, one sees still {,}, but word actually inserts {;}, and it's the correct thing to use in my case.

Hope this might be of help to someone.

[My version is the last one: Word 2003 (11.8411.8405) SP3]

Thank you.


2022-01-05 05:04:14

Krasimir Paskulov

Allen,
Thank you for your time and effort.
I highly appreciate it, as you've helped me and many other people around the world use word in a much better way.
I followed your last suggestions, there was a slight difference in step 5, there, when I click on "Num Occurrences", word inserted {;} instead of {,}, I tried with both, getting the same result - The Find What text contains a Pattern Match expression which is not valid.
I don't think I have any limitations in word, I have the full registered version.
I have used the wildcards option in the find and replace dialog many many times, using successfully also the same curly braces, only in this case they don't work for some reason.
Obviously it just wasn't meant to be :)
Thank you


2022-01-04 08:56:49

Allen

Krasimir,

Thanks for providing the link to the screen shot. (That was helpful.)

I'm not sure why you are getting the results you are, as I cannot reproduce them. I get exactly what the tip says I should get--the replacements. You do, however, provide a few clues which can be followed.

Here is what I would try, since you are seeing the message that the problem is with the Find What box.

1. Make sure the Use Wildcards check box is selected.
2. Clear out the Find What box. Make sure it is empty, but put the insertion point within it.
3. Type a single sapce.
4. Click Special, at the bottom of the dialog box. You'll see a bunch of options appear.
5. Choose the "Num Occurrences" option. Word inserts a pair of braces surrounding a comma, like this: {,}
6. Just before the comma, type the number 2.
7. Make sure ^t is in the Replace With box.
8. Click Replace All.

If, after step 5, you don't see the curly braces appear, then the only thing I can conclude is that there is some limitation or variation based on your version of Word.


2022-01-04 05:38:49

Krasimir Paskulov

I'm following strictly what's written in https://word.tips.net/T000851_Replacing_Multiple_Spaces_with_Tabs

The space before the {2,} is NOT missing, and BOTH of the curly brackets are CURLY bracket, as instructed in https://word.tips.net/T000851_Replacing_Multiple_Spaces_with_Tabs (and many other posts, by the way).
I've copied and pasted the content, I'm sure there's nothing wrong that I'm doing, that's why I decided to bother you for some advice.

Here's exactly what I do:
To avoid other influencing factors, I open a new word document, I type several spaces, I type 123, then I type some more spaces.
Ctrl+H,
I type " {2,}" (without the quotation marks, of course) in Find What:
I type ^t in Replace With:
I hit Replace All, or Find Next and I always get the same error message:
The Find What text contains a Pattern Match expression which is not valid.

Here's the link to the picture illustrating the situation:
http://krasitrad.com/box/ReplMultSpWithTabs.jpg

Thanks for you time.


2022-01-04 04:14:14

Ken

Krasimir,

Either the space before the {2,} is missing or one or both of the curly brackets is as straight bracket.


2022-01-04 03:59:37

Alan Elston

Hi Krasimir Paskulov
I am not sure of the answer to yout questions, but did you check here......
.....
https://word.tips.net/T000851_Replacing_Multiple_Spaces_with_Tabs
.....
That is tips from Allen Wyatt for Word 2003 ( Word tips net )


2022-01-03 11:28:54

Krasimir Paskulov

Hi,
Can you explain to me why this trick is not working in my word 2003?
I did exactly as instructed.
Here is the result:

{2,} -> The Find What text contains a Pattern Match expression which is not valid.

Thank you.


2020-02-17 14:17:13

Jay

It appears that for us troglodytes that use two spaces between sentences, {3,} would be more appropriate.


2020-02-17 11:53:50

Bill

"enter a single space followed by the characters {2,}"

can you give an explanation of [2,] ?

It would be helpful to know so I can modify this suggestion to other situations.


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.