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.
Written by Allen Wyatt (last updated February 15, 2020)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365
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:
Figure 1. The Replace tab of the Find and Replace dialog box.
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.
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!
The Find and Replace capabilities of Word are quite powerful. If you want to change the formatting of just a part of text ...
Discover MoreFinding and replacing text when the text being searched for has mixed formatting can be a challenge. You may, however, ...
Discover MoreIf you have a document that was produced in a country where decimal commas are used instead of decimal points, you may be ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2022-01-05 07:37:47
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
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
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
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
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.
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments