+ Reply to Thread
Results 1 to 2 of 2

Search a word and highlight

  1. #1
    Forum Contributor
    Join Date
    11-18-2007
    Posts
    111

    Search a word and highlight

    Hi,
    I have this code and would like to modify little bit with your help. Here is what i want to do:
    1)I would like to search each cell in every column in the entire worksheet. The code currently searches only in column A and i would like to expand it in the entire sheet.
    2) I need only to search and highlight if it finds the list of words that i specified like the word "BT" or "BTG" But the problem with this code is that it finds and highlights any word that contain the words "BT" or "BTG". For instance, it finds like this word "BTGL" or "BTA" but i want only to find the words that i specify in my list. I would really appreciate if you can help me with this. Thank you so much.
    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello karinos57,

    You need to change a the search value LookAt from xlPart to xlWhole if you want to match the whole word and not just part of the word. See the code in blue below...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

+ 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