Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi, I'm trying to do a Find and Replace function in MS Word to find all
numbers ranging between 0 and 999999 and to effectively delete these. Does anyone know how to construct this in the Find and Replace function? Thanks in advance. Chaps |
#2
![]() |
|||
|
|||
![]()
Wildcard search for
[0-9] replace with nothing will delete all numbers from the document. If you want to remove the space also, you would need [0-9]{1,6}[ ] replace with nothing. The square brackets around the space are unnecessary, yoiu can leave them or not as you wish. See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org See http://www.gmayor.com/replace_using_wildcards.htm Chappy wrote: Hi, I'm trying to do a Find and Replace function in MS Word to find all numbers ranging between 0 and 999999 and to effectively delete these. Does anyone know how to construct this in the Find and Replace function? Thanks in advance. Chaps |
#3
![]() |
|||
|
|||
![]()
Hi Graham,
Thanks for your reply. However I am not looking to remove all numbers in the document, I am only seeking to remove the range 0-999999. What I want to keep in my document is all numbers that contain 7 digits or more. Any numbers that contain 6 digits or less I wish to remove. Example: I wish to remove all numbers such as 1, 14, 399, 6666, 12345, 999999 but if they are 1234567 or 9876543210 then I wish to keep them. Thanks, chappy "Graham Mayor" wrote: Wildcard search for [0-9] replace with nothing will delete all numbers from the document. If you want to remove the space also, you would need [0-9]{1,6}[ ] replace with nothing. The square brackets around the space are unnecessary, yoiu can leave them or not as you wish. See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org See http://www.gmayor.com/replace_using_wildcards.htm Chappy wrote: Hi, I'm trying to do a Find and Replace function in MS Word to find all numbers ranging between 0 and 999999 and to effectively delete these. Does anyone know how to construct this in the Find and Replace function? Thanks in advance. Chaps |
#4
![]() |
|||
|
|||
![]()
Try this, with Use Wildcards enabled.
Find what:[!0-9][0-9]{1,6}[!0-9] Replace with:leave blank If your document begins with a number qualified for deletion, then that number will be missed by the search. All other numbers containing 1 to 6 digits will be deleted. [!0-9]= Not a number [0-9]{1,6}=Numbers with 1 to 6 digits [!0-9]=Not a number So, basically, it searches for 1 to 6 digit numbers that are brackets by non-numbers. -- Herb Tyson MS MVP Please respond in the newsgroups so everyone can follow along. "Chappy" wrote in message ... Hi Graham, Thanks for your reply. However I am not looking to remove all numbers in the document, I am only seeking to remove the range 0-999999. What I want to keep in my document is all numbers that contain 7 digits or more. Any numbers that contain 6 digits or less I wish to remove. Example: I wish to remove all numbers such as 1, 14, 399, 6666, 12345, 999999 but if they are 1234567 or 9876543210 then I wish to keep them. Thanks, chappy "Graham Mayor" wrote: Wildcard search for [0-9] replace with nothing will delete all numbers from the document. If you want to remove the space also, you would need [0-9]{1,6}[ ] replace with nothing. The square brackets around the space are unnecessary, yoiu can leave them or not as you wish. See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org See http://www.gmayor.com/replace_using_wildcards.htm Chappy wrote: Hi, I'm trying to do a Find and Replace function in MS Word to find all numbers ranging between 0 and 999999 and to effectively delete these. Does anyone know how to construct this in the Find and Replace function? Thanks in advance. Chaps |
#5
![]() |
|||
|
|||
![]()
Thanks Herb, it works a treat!
"Herb Tyson [MVP]" wrote: Try this, with Use Wildcards enabled. Find what:[!0-9][0-9]{1,6}[!0-9] Replace with:leave blank If your document begins with a number qualified for deletion, then that number will be missed by the search. All other numbers containing 1 to 6 digits will be deleted. [!0-9]= Not a number [0-9]{1,6}=Numbers with 1 to 6 digits [!0-9]=Not a number So, basically, it searches for 1 to 6 digit numbers that are brackets by non-numbers. -- Herb Tyson MS MVP Please respond in the newsgroups so everyone can follow along. "Chappy" wrote in message ... Hi Graham, Thanks for your reply. However I am not looking to remove all numbers in the document, I am only seeking to remove the range 0-999999. What I want to keep in my document is all numbers that contain 7 digits or more. Any numbers that contain 6 digits or less I wish to remove. Example: I wish to remove all numbers such as 1, 14, 399, 6666, 12345, 999999 but if they are 1234567 or 9876543210 then I wish to keep them. Thanks, chappy "Graham Mayor" wrote: Wildcard search for [0-9] replace with nothing will delete all numbers from the document. If you want to remove the space also, you would need [0-9]{1,6}[ ] replace with nothing. The square brackets around the space are unnecessary, yoiu can leave them or not as you wish. See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org See http://www.gmayor.com/replace_using_wildcards.htm Chappy wrote: Hi, I'm trying to do a Find and Replace function in MS Word to find all numbers ranging between 0 and 999999 and to effectively delete these. Does anyone know how to construct this in the Find and Replace function? Thanks in advance. Chaps |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to insert a Symbol into the Find and Replace Function in Word | Microsoft Word Help | |||
Problem with function "Find and Replace" in Word. | Microsoft Word Help | |||
How do I find and replace a superscript number in a word? | Microsoft Word Help | |||
Find and Replace Locks Up Word | Formatting Long Documents | |||
Find and Replace Locks Up Word | Microsoft Word Help |