+ Reply to Thread
Results 1 to 5 of 5

Replace each "§" to "µ" but not those followed by space or "."

  1. #1
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    Replace each "§" to "µ" but not those followed by space or "."

    Hello everyone,
    I need a macro which does following for the selected area:

    1a. Step
    Each "§" should be replaced by "µ" in whole document but not those which are followed by "." or ";" or "»" or "«" or "(" or ")" or followed by space.
    1b. Step
    Change the color of new added "µ" to red.

    2. Step
    Each "~" should be replaced by "&" but not those which have "." or ";" or "»" or "«" or "(" or ")" or space befor it.
    2b. Step
    Change the color of new added "&" to red.

    3. Step
    Show message how many "§" and how many "~" were added.



    Example:
    Germa§ vot§r§. ~a~e re~ §av~.


    should become:

    Germa§ votµr§. ~a&e re& §av&.

    Thank you very much for each assistance in advance.



    Posted in Word programming area as well:
    Attached Files Attached Files
    Last edited by wali; 09-30-2009 at 11:04 AM.

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Replace each "§" to "µ" but not those followed by space or "."

    I've made a Custom Function. I can't get the red right yet, but here is the intermediate solution:

    Please Login or Register  to view this content.
    If the String is in A1 then place this formula
    Please Login or Register  to view this content.
    in another cell
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    Re: Replace each "§" to "µ" but not those followed by space or "."

    Thank you very much. It works very good. I need this for MS word. Is it possible to have the same function as makro for MS word or for Excel?

    Thank you very much

  4. #4
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Replace each "§" to "µ" but not those followed by space or "."

    This is an excel forum, so maybe you have to post the same request at a word forum.

  5. #5
    Forum Contributor
    Join Date
    11-12-2007
    Location
    Germany
    MS-Off Ver
    2007
    Posts
    472

    Re: Replace each "§" to "µ" but not those followed by space or "."

    Ok! Thank you very much. It works perfect in excel.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1