Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Aug 2015
    Posts
    107
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Unhappy Find and Replace semicolons with dots in digits (Word 2010)

    I am trying to find and replace e.g. clause 1;1;1 with clause 1.1.1 - I have tried inserting in Find: ( ; )[0-9] without spaces and Replace: .^& but I end up with clause 1.;1.;1.; etc. Can anyone please help where I am going wrong. Thanks

  2. #2
    2 Star Lounger
    Join Date
    Dec 2009
    Location
    Tennessee,USA
    Posts
    173
    Thanks
    31
    Thanked 17 Times in 15 Posts
    I tried this on my Word and it was very simple. In the find what: line I just entered ";" sans quotes. In the replace with: field I entered"." , agaon sana quotes.
    It replaced all the semi colons perfectly.
    See attachment.
    michael
    Find and Replace 01.jpg

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,838
    Thanks
    411
    Thanked 1,570 Times in 1,421 Posts
    LLSD,

    What you need is a Regular Expression. Try this one:
    Mike37RegEx.JPG
    In the Find what: ([0-9])(;)([0-9])
    In the Replace with: \1.\3
    Check the Use wildcards box.

    Test Text:
    This is a test of Replacing semi-colons (;) in numbers with periods (.).
    123;45 This is a sentence with a semi-colon; this should not be replaced
    567;34 and per the poster 1;1;1.

    Results.
    This is a test of replacing semi-colons (;) in numbers with periods (.).
    123.45 This is a sentence with a semi-colon; this should not be replaced
    567.34 and per the poster 1.1.1.

    Note: You have to run the F&R more than once as the first run will return 1.1;1 for your numbers! The second run finishes the job.

    HTH
    Last edited by RetiredGeek; 2015-08-05 at 12:28.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  4. The Following User Says Thank You to RetiredGeek For This Useful Post:

    Lady-Laughsalot (2015-08-06)

  5. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,539
    Thanks
    38
    Thanked 68 Times in 64 Posts
    Same as Michael37713 -- no problem with the replacement in Word 2010. If there are semi-colons elsewhere that should not be replace, then RG has the right method.
    Last edited by kweaver; 2015-08-05 at 16:49.

  6. #5
    2 Star Lounger
    Join Date
    Aug 2015
    Posts
    107
    Thanks
    16
    Thanked 0 Times in 0 Posts
    Thank you so much for your help, this works - I am updating company house style documents and each doc has a table of definitions so I have to change the full stop at the end of each row in the column 2 (description) with a semi colon but not replace the clause numbering dots - have tested this several times and it works perfectly - I will now create a macro.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •