+ Reply to Thread
Results 1 to 8 of 8

Highlight rows that matches the wildcard string

  1. #1
    Registered User
    Join Date
    07-08-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    53

    Highlight rows that matches the wildcard string

    Hi there, good day!

    I am not sure if conditional formatting can do this but I want to search for a text in my
    entire sheet (Log File) of 500 entries and state that;

    IF any cell in Column B has the string "Unknown", then highlight corresponding Row (yellow).

    Also, IF any cell in Column B has the string "ERROR", then bold (in red) the words in the cell.

    Any help will be appreciated. I've attached sample file in the 'Log File (My Requirements)' tab.
    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Highlight rows that matches the wildcard string

    Try this ...
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-08-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Highlight rows that matches the wildcard string

    Thanks Bob!

    I hope you don't mind pasting the vba codes here 'cos i can't seem to view the codes in the spreadsheet that you attached. Many thanks!

  4. #4
    Registered User
    Join Date
    07-08-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Highlight rows that matches the wildcard string

    I read up that it is possible to use a conditional formatting instead of a macro to search for wildcard string and highlight the respective cells. However I would like to use a button that allows to automatically highlight after finding the strings "Unknown" and automatically change the color of the words in the cell red after it founds the string "Error". I will be most glad if anyone can teach me how to go about implementing it. Here are the codes that i have amended. Many thanks!

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-08-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Highlight rows that matches the wildcard string

    Hi,

    I have managed to revise my code which allows the macro to search for the unique strings and highlights the cells. It works well but I encountered a problem when i added in this code to clear highlights.
    Please Login or Register  to view this content.
    When I run the macro, it will prompt me to this line.
    Please Login or Register  to view this content.
    Could anyone tell me what seem to be the problem here? I have attached a SAMPLE1 file for your reference.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-08-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    53

    Re: Highlight rows that matches the wildcard string

    Hi all,

    I've decided to forgo the 'Remove highlights button' . However, for the benefit of those who are trying to find the macro that will find the unique string and higlight the cell, here it is:

    Please Login or Register  to view this content.
    Hope it helps! Happy coding! =)

  7. #7
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Highlight rows that matches the wildcard string

    My solution was addng conditional formatting to the sheet.

  8. #8
    Registered User
    Join Date
    02-20-2016
    Location
    Hamburg, Germany
    MS-Off Ver
    Office for Mac 2011
    Posts
    1

    Re: Highlight rows that matches the wildcard string

    Thank you so much for the sample files! Been searching the internet for months for a solution to this.

+ 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