Format a long phone number list

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a list of phone numbers that look like this:
402,2000087
402,2000091
402,2000092
I would like to take the comma out to look like this:
4022000087
4022000091
4022000092
Is there a fast way to do this rather than having to go line by line? I
have about 5000 pages of numbers

Thank You
 
Use Find and Replace. Assuming the numbers don't all begin 40220000 (which
would make things really simple), try the following.

Press Ctrl+H, and click the More button. Click to enable Use wildcards.

In Find what:([0-9][0-9][0-9]),([0-9][0-9][0-9][0-9])

Replace With:\1\2

This assumes that you don't have other number patterns that begin "###,###".
 
I tried it but it says it made 0 changes. I am using Word 2000 if that helps.

Thank You,

Herb Tyson said:
Use Find and Replace. Assuming the numbers don't all begin 40220000 (which
would make things really simple), try the following.

Press Ctrl+H, and click the More button. Click to enable Use wildcards.

In Find what:([0-9][0-9][0-9]),([0-9][0-9][0-9][0-9])

Replace With:\1\2

This assumes that you don't have other number patterns that begin "###,###".

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


leo123 said:
I have a list of phone numbers that look like this:
402,2000087
402,2000091
402,2000092
I would like to take the comma out to look like this:
4022000087
4022000091
4022000092
Is there a fast way to do this rather than having to go line by line? I
have about 5000 pages of numbers

Thank You
 
Are you sure you checked "Use wildcards"? It doesn't work without
that.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

I tried it but it says it made 0 changes. I am using Word 2000 if that helps.

Thank You,

Herb Tyson said:
Use Find and Replace. Assuming the numbers don't all begin 40220000 (which
would make things really simple), try the following.

Press Ctrl+H, and click the More button. Click to enable Use wildcards.

In Find what:([0-9][0-9][0-9]),([0-9][0-9][0-9][0-9])

Replace With:\1\2

This assumes that you don't have other number patterns that begin "###,###".

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


leo123 said:
I have a list of phone numbers that look like this:
402,2000087
402,2000091
402,2000092
I would like to take the comma out to look like this:
4022000087
4022000091
4022000092
Is there a fast way to do this rather than having to go line by line? I
have about 5000 pages of numbers

Thank You
 
Yes I checked and "Use wilcards" is checked. I also should mention the phone
numbers are area code and seven digits. I noticed that in the find what box
Herbs code only uses seven digits. Would that make a difference?
All the phone numbers listed have a "402" area code.

Thanks

Jay Freedman said:
Are you sure you checked "Use wildcards"? It doesn't work without
that.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

I tried it but it says it made 0 changes. I am using Word 2000 if that helps.

Thank You,

Herb Tyson said:
Use Find and Replace. Assuming the numbers don't all begin 40220000 (which
would make things really simple), try the following.

Press Ctrl+H, and click the More button. Click to enable Use wildcards.

In Find what:([0-9][0-9][0-9]),([0-9][0-9][0-9][0-9])

Replace With:\1\2

This assumes that you don't have other number patterns that begin "###,###".

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


I have a list of phone numbers that look like this:
402,2000087
402,2000091
402,2000092
I would like to take the comma out to look like this:
4022000087
4022000091
4022000092
Is there a fast way to do this rather than having to go line by line? I
have about 5000 pages of numbers

Thank You
 
I'm not sure what the problem is. I tried Herb's solution, pasting
your numbers into a document and pasting Herb's search expressions
into the dialog, and it worked (as I already knew it would).

The seven digits vs. nine doesn't make any difference. You could use
just one digit on either side of the comma, and it would still work
provided there weren't any instances of digit-comma-digit that weren't
part of a phone number.

You didn't perhaps have some formatting or style specified in the Find
What? Did you paste Herb's expression, rather than typing it in by
hand?

Since the numbers are all in the same area code, you could try using
the expression

(402),([0-9][0-9][0-9][0-9])

or even (picking up all seven digits of the number after the comma)

(402),([0-9]{7})

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.


Yes I checked and "Use wilcards" is checked. I also should mention the phone
numbers are area code and seven digits. I noticed that in the find what box
Herbs code only uses seven digits. Would that make a difference?
All the phone numbers listed have a "402" area code.

Thanks

Jay Freedman said:
Are you sure you checked "Use wildcards"? It doesn't work without
that.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

I tried it but it says it made 0 changes. I am using Word 2000 if that helps.

Thank You,

:

Use Find and Replace. Assuming the numbers don't all begin 40220000 (which
would make things really simple), try the following.

Press Ctrl+H, and click the More button. Click to enable Use wildcards.

In Find what:([0-9][0-9][0-9]),([0-9][0-9][0-9][0-9])

Replace With:\1\2

This assumes that you don't have other number patterns that begin "###,###".

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


I have a list of phone numbers that look like this:
402,2000087
402,2000091
402,2000092
I would like to take the comma out to look like this:
4022000087
4022000091
4022000092
Is there a fast way to do this rather than having to go line by line? I
have about 5000 pages of numbers

Thank You
 
leo123 said:
I have a list of phone numbers that look like this:
402,2000087
402,2000091
402,2000092
I would like to take the comma out to look like this:
4022000087
4022000091
4022000092
Is there a fast way to do this rather than having to go line by line? I
have about 5000 pages of numbers

Thank You


If it is JUST a list, and has no other text, do a Find and Replace. Find ","
(without the quotes) and leave the Replace field blank.
 
I use 2000 -- so maybe it's different in newer versions...

but I just used Find/Replace... put the , in the FIND and nothing at all in
the REPLACE and it quickly removed them all.
 
Without knowing the complexity of the document -- whether there might be
other numbers that need to be preserved -- the wildcard solution lets you
very narrowly target what gets changed. If the document didn't have other
numbers/commas to be concerned about, then a more straightforward
non-wildcard search is certainly easier.

Word 2000's Find/Replace works the same as later versions for the features
we were describing. I'm glad you found a solution that worked.

Cheers,
 
Back
Top