Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi all,
Can anyone provide me with guidance. I have a series of comma & space separated values in the format:- 542224452, 5422245#, 54222740, 54223425, 5422346, 542235, 54224140, 54224141#, 542244412, 542244413#, 542244414#, 542244415#, 542244416#, 542244417#, 542244418#. I'd like use a find and replace function to find all the numbers ending in a # and replace them with just the number (ie without the #) but in bold (or another colour ie Red). Any advice will be gratefully received. Thanks in advance Yandros |
#2
![]() |
|||
|
|||
![]()
Use a wildcard replace of
([0-9]{1,})# with \1 (with format font red colour & bold set) -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Yandros wrote: Hi all, Can anyone provide me with guidance. I have a series of comma & space separated values in the format:- 542224452, 5422245#, 54222740, 54223425, 5422346, 542235, 54224140, 54224141#, 542244412, 542244413#, 542244414#, 542244415#, 542244416#, 542244417#, 542244418#. I'd like use a find and replace function to find all the numbers ending in a # and replace them with just the number (ie without the #) but in bold (or another colour ie Red). Any advice will be gratefully received. Thanks in advance Yandros |
#3
![]() |
|||
|
|||
![]()
Hi Graham,
Thank you very much. This definitely hits the spot. You've saved me a great deal of time (can you imagine having to do this manually on a series which contains some 1800 to 2000 values)! I am very grateful. Thank again for taking the time and effort (and also finding the solution so quickly too). "Graham Mayor" wrote: Use a wildcard replace of ([0-9]{1,})# with \1 (with format font red colour & bold set) -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Yandros wrote: Hi all, Can anyone provide me with guidance. I have a series of comma & space separated values in the format:- 542224452, 5422245#, 54222740, 54223425, 5422346, 542235, 54224140, 54224141#, 542244412, 542244413#, 542244414#, 542244415#, 542244416#, 542244417#, 542244418#. I'd like use a find and replace function to find all the numbers ending in a # and replace them with just the number (ie without the #) but in bold (or another colour ie Red). Any advice will be gratefully received. Thanks in advance Yandros |
#4
![]() |
|||
|
|||
![]()
If you want to read the background, 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 Yandros wrote: Hi Graham, Thank you very much. This definitely hits the spot. You've saved me a great deal of time (can you imagine having to do this manually on a series which contains some 1800 to 2000 values)! I am very grateful. Thank again for taking the time and effort (and also finding the solution so quickly too). "Graham Mayor" wrote: Use a wildcard replace of ([0-9]{1,})# with \1 (with format font red colour & bold set) -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Yandros wrote: Hi all, Can anyone provide me with guidance. I have a series of comma & space separated values in the format:- 542224452, 5422245#, 54222740, 54223425, 5422346, 542235, 54224140, 54224141#, 542244412, 542244413#, 542244414#, 542244415#, 542244416#, 542244417#, 542244418#. I'd like use a find and replace function to find all the numbers ending in a # and replace them with just the number (ie without the #) but in bold (or another colour ie Red). Any advice will be gratefully received. Thanks in advance Yandros |
#5
![]() |
|||
|
|||
![]() Quote:
This is a related question: How can one search for the following string: "^p, followed by any 3 characters, followed by a space" and replace ONLY the space with a ^t? I have not been able to use wildcards or other special search characters. Thanks, Merrill |
#6
![]() |
|||
|
|||
![]()
you can use a macro like this one (which only converts
one number) Selection.Find.ClearFormatting With Selection.Find .Text = "#" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Selection.MoveLeft Unit:=wdWord, Count:=2, Extend:=wdExtend Selection.Font.Bold = wdToggle Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Delete Unit:=wdCharacter, Count:=1 -----Original Message----- Hi all, Can anyone provide me with guidance. I have a series of comma & space separated values in the format:- 542224452, 5422245#, 54222740, 54223425, 5422346, 542235, 54224140, 54224141#, 542244412, 542244413#, 542244414#, 542244415#, 542244416#, 542244417#, 542244418#. I'd like use a find and replace function to find all the numbers ending in a # and replace them with just the number (ie without the #) but in bold (or another colour ie Red). Any advice will be gratefully received. Thanks in advance Yandros . |
#7
![]() |
|||
|
|||
![]()
Hi Jesse,
I was really looking for a solution that would convert all the numbers (I have a list of up 2000 to work through). However, thank you for taking the time to help me solve the problem Yandros "jessi" wrote: you can use a macro like this one (which only converts one number) Selection.Find.ClearFormatting With Selection.Find .Text = "#" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute Selection.MoveLeft Unit:=wdWord, Count:=2, Extend:=wdExtend Selection.Font.Bold = wdToggle Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Delete Unit:=wdCharacter, Count:=1 -----Original Message----- Hi all, Can anyone provide me with guidance. I have a series of comma & space separated values in the format:- 542224452, 5422245#, 54222740, 54223425, 5422346, 542235, 54224140, 54224141#, 542244412, 542244413#, 542244414#, 542244415#, 542244416#, 542244417#, 542244418#. I'd like use a find and replace function to find all the numbers ending in a # and replace them with just the number (ie without the #) but in bold (or another colour ie Red). Any advice will be gratefully received. Thanks in advance Yandros . |