+ Reply to Thread
Results 1 to 20 of 20

Macro to highlight diacritic characters in a column in excel

  1. #1
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Macro to highlight diacritic characters in a column in excel

    Hi,

    I need Macro to highlight diacritic characters in a column in excel.

    Thanks!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,807

    Re: Macro to highlight diacritic characters in a column in excel

    If you can tell me the set of characters you want to highlight, and what "highlight" means, I might be able to help with this.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    Hi,

    I need to find or color diacritic character in a column to remove or to do replacement.

    we can consider all diacritic characters.

    Thanks!

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,807

    Re: Macro to highlight diacritic characters in a column in excel

    Here is a macro-based solution [format specific characters in a cell.xlsm] for a general case, but you need to define your set of diacritic characters. There are thousands of characters, for example, in the Arial font set. I don't which ones you consider to have diacritics. In the attached example, create a list of characters in column A of "Character List" sheet. In this example, I used vowels. Push the button on the Data sheet to highlight all matching characters in bold red font.

  5. #5
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    Ok.But I am double clicking on the button.It is not working.
    I Don't see any colored text.

    Thanks,
    Narendra

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,807

    Re: Macro to highlight diacritic characters in a column in excel

    What are your macro security settings? You must allow macros to run. The recommended setting is "Disable all macros with notification". At this setting, if you open a file with macros Excel will tell you, and ask if you want them enabled for that file.

    You do not need to double-click; buttons require only a single click.

  7. #7
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    Hi Macro was enabled and I tried ur way also..but no seeing any highlighted color if I click on button.

    Thanks

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,807

    Re: Macro to highlight diacritic characters in a column in excel

    I downloaded the file from my own link above to make sure I have exactly the same as you, pushed the button, and it works perfectly. I am using Excel 2007 on a Vista system. I have no idea why it is not working for you.

    Try this. [format specific characters in a cell.xlsm] I have added another button labeled Test. If you press it you will get a message box that says "Button pressed." If nothing happens then you probably do not have macros configured to run.

  9. #9
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    Hi,

    Not working.I will run macros frequently..and it works.I am using 2007 with XP.
    Give me the code I will put in my vaba and check as I dont see any code in your sheet.

    Thanks

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,807

    Re: Macro to highlight diacritic characters in a column in excel

    Doesn't makes sense to me. Like I said, I download the file, see the code, runs fine. The code below is in the module for the worksheet containing the data you want to highlight.
    Please Login or Register  to view this content.
    The code below is in a Module named SetFormats, although it could also be put in the Worksheet module.
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    Hi

    Please give steps to run this code on my sheet.

    Thanks

  12. #12
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,807

    Re: Macro to highlight diacritic characters in a column in excel

    Open the worksheet containing the data.
    On the menu, select Developer, Design Mode
    Select Insert, and on the bottom part of the dialog box, under ActiveX controls, select the Button control
    On the worksheet, click and drag to create a button
    Right click the button to bring up the Properties window
    for the button name (first property) change CommandButton1 to buttonRun
    Hit ALT-F11 to open the VBA development window
    Find your file on the left tree, under that double click the name of the worksheet with your data
    In the code window on the right side, paste in all the code that I provided above
    Return to the worksheet, click on the Design Mode button to clear it
    Press the button you created to run the code

  13. #13
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    The set of characters would be:

    ü.ú.ù.ö.ó.ò.ñ.ï.í.ì.ë.é.è.ä.ã.á.à

    Thanks,
    Narendra

  14. #14
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    Hi,

    Please provide macro code to highlight these character in a column.

    The set of characters would be:

    ü.ú.ù.ö.ó.ò.ñ.ï.í.ì.ë.é.è.ä.ã.á.à

    Thanks,
    Narendra

  15. #15
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    Hi Basically I need to highlight the particular cells that contains diacritic accents in a column.
    Please provide the code.
    The set of characters would be:

    ü.ú.ù.ö.ó.ò.ñ.ï.í.ì.ë.é.è.ä.ã.á.à
    Please find attached example sheet.

    Thanks
    Attached Files Attached Files

  16. #16
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,807

    Re: Macro to highlight diacritic characters in a column in excel


  17. #17
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    Again button is not working.

    Please provide the code to run with out button.

    I am using 2007 with XP.

    Thanks

  18. #18
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,807

    Re: Macro to highlight diacritic characters in a column in excel

    All the code is provided in post #10. You can change buttonRun_Click from Private to Public and run it like any other macro. You can also change its name if you wish.

  19. #19
    Forum Contributor
    Join Date
    08-12-2012
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Macro to highlight diacritic characters in a column in excel

    H,
    How to make it public?
    And change name?

    Thanks

  20. #20
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,807

    Re: Macro to highlight diacritic characters in a column in excel

    In a previous post you said,
    Quote Originally Posted by narendrabr View Post
    Give me the code I will put in my vaba and check....
    so I assume you know how to install and edit code. You just need to change the word "Private" to "Public" and change the Sub name "buttonRun_Click" to anything else you want to call it. You could even leave it alone, but it may not be very intuitive for you.

+ 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