Removing multiple tab characters

G

gwh

Hi everyone,

I've received a Word document where someone's pressed the tab key a
heap of times in order to align columns. I need to eventually take the
file into excel and I'd like there to be only one tab character between
each column.

Can someone outline how I'd use the find and replace function in Word
to find where more than one tab key has been pressed and then replace
it with just the one tab character?

Would really appreciate any help.

Thanks very much.
 
M

Michel Bintener

Hi,
you'll need to do a wildcard find and replace. In the Find field, enter the
following, without the quotation marks:

"^t{1;}"

In the Replace field, enter (again, without the quotation marks):
"^t"

If you can't see any advanced options in the find window, click on the small
blue triangle in the bottom left corner, and make sure that the checkbox
"Use wildcards" is enabled. If you now hit "Replace All", Word should
replace your multiple tabs by single ones.

FYI, "^t" is Word's expression for a tab space, and "{1;}" tells Word to
look for the tab space when it occurs more than once.

If you ever want to find out more about wildcards, read this website:
http://word.mvps.org/faqs/general/UsingWildcards.htm
(if you use Safari, hit refresh a couple of times. Preferably, use a
different browser.) Also, you might want to teach the person who sent you
the document the usage of tabulator marks, tables and columns. ;-)

Michel
 
G

gwh

Thanks for the reply Michel,

I've just followed your instructions but when I press the "replace all"
button, I get the message:

"The Find What text contains a Pattern Match expression which is not
valid"

Can you tell me what might be going on here?

Thanks so much.
 
J

JE McGimpsey

I've just followed your instructions but when I press the "replace all"
button, I get the message:

"The Find What text contains a Pattern Match expression which is not
valid"

Can you tell me what might be going on here?

Michel, presumably posting from Europe, used the semi-colon to indicate
more than one instance ({1;}). US English versions, at least require a
comma. This is also explained in item 7 on the web site Michel pointed
you to:

Try replacing

^t{1,}

with

^t
 
M

Michel Bintener

Michel, presumably posting from Europe, used the semi-colon to indicate
more than one instance ({1;}). US English versions, at least require a
comma. This is also explained in item 7 on the web site Michel pointed
you to:

Try replacing

^t{1,}

with

^t

Ah, very interesting! That's right, I'm from Europe, and I remember using
the comma instead of the semi-colon when I first started using the wildcard
search and I got the same error message.

JE, do you know if this is only a US English/UK English difference? Or is it
US/Europe difference? It would probably be a good idea to add a small
explanation on the MVP wildcard search page; just a suggestion

Anyway, thanks for pointing that out!

Michel
 
R

Roger Morris

Michel Bintener said:
Ah, very interesting! That's right, I'm from Europe, and I remember using
the comma instead of the semi-colon when I first started using the wildcard
search and I got the same error message.

JE, do you know if this is only a US English/UK English difference? Or is it
US/Europe difference? It would probably be a good idea to add a small
explanation on the MVP wildcard search page; just a suggestion

Anyway, thanks for pointing that out!

Michel

In the UK: with Word 11.2 & Mac OS 10.4.4 * I have to use the comma:

^t{1,} idoes find multiple occurrences
^t{1:} fails.

This is confirmed in (my) Word Help:
Advanced search methods
Wildcard characters you can use when searching

(* both purchased in the UK)
 
M

Michel Bintener

In the UK: with Word 11.2 & Mac OS 10.4.4 * I have to use the comma:

^t{1,} idoes find multiple occurrences
^t{1:} fails.

This is confirmed in (my) Word Help:
Advanced search methods
Wildcard characters you can use when searching

(* both purchased in the UK)

Right, so it's not related to Office. I do have a British version of Office
(if there is such a thing; I simply got my English version of Office through
Amazon.co.uk), but at the same time, I'm using a Swiss-French keyboard
layout, while Mac OS X itself is in English (I know, I know, it's a strange
configuration!). So I suspect the keyboard layout's the culprit, then.
Thanks for letting me know!
 
P

Peter Jamieson

In the Windows version of Word you need to use the same character that is
set in Windows Control Panel|Regional OptionsCustomize|List separator, but I
have no idea where Word gets the equivalent value on the Mac - the System
Preferences dialog only seems to list options for dates and numbers. but
maybe someone who knows the Mac better knows where this stuff might be.

Peter Jamieson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top