+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : How can i highlight the exact matching word when sorting text?

  1. #1
    Registered User
    Join Date
    04-15-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2007
    Posts
    67

    How can i highlight the exact matching word when sorting text?

    For example, i want to highlight all cells in a column that contain the word "run" and i don't want to highlight the cells that contain the word "running". I want to highlight only the exact word and the words that contain part of this word.


    How can i do this?


    Thanks!
    Last edited by emil9216; 04-29-2011 at 06:23 AM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    10,094

    Re: How can i highlight the exact matching word when sorting text?

    Did you try the built in Find and Replace?

    Ctrl+ H
    Find what: run
    Replace with: run

    Expand Options
    For Replace with: run >> Format: Pick what you desire

    Check Match entire cell contents
    Replace All

    In my test with run and running only run was highlighted.
    HTH
    Regards, Jeff

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    33,809

    Re: How can i highlight the exact matching word when sorting text?

    @Jeff: it sounds as though there might be other words in the cell. For example:

    I can run
    running man
    run to me
    fastest runner
    I run too

    And, if I'm correct, the OP only wants the cells with "run" but not "runner" or "running".

    Regards
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    10,094

    Re: How can i highlight the exact matching word when sorting text?

    Quote Originally Posted by emil9216 View Post
    For example, i want to highlight all cells in a column that contain the word "run" and i don't want to highlight the cells that contain the word "running". I want to highlight only the exact word and the words that contain part of this word.
    Maybe I misread your request the first time as I often do.

    Are you saying "ONLY" the word running should be excluded, but if the word contains run then it should be hightlighted?

    run >> Highlight
    running >> No Highlight
    Runner >> Highlight
    Runt >> Highlight
    Crunchiness >> Highlight
    Runoff>> Highlight

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-15-2011
    Location
    Sofia
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: How can i highlight the exact matching word when sorting text?

    Sorry, if i wasn't enough clear. I don't want to highlight any other words that contain the word "run", not just "running". I want to highlight the cells only containing the word "run" even if it with combination wiht other words like "run fast", "do not run"...

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    10,094

    Re: How can i highlight the exact matching word when sorting text?

    Here you go.

    This will highlight all occurences of the word run in column A.

    The only thing which was tripping me up was the prevention of highlighting Running, I put it into an If statement to exclude Running, but then running would get highlighted so had to add another If statement. I know there must be a way to ignore the case, but just not sure. Give this a try and maybe somebody else can offer some suggestions.

    Please Login or Register  to view this content.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    33,809

    Re: How can i highlight the exact matching word when sorting text?

    Use:

    Please Login or Register  to view this content.

    Regards

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Excel 2016
    Posts
    10,094

    Re: How can i highlight the exact matching word when sorting text?

    That works great, thanks. I had tried UCase and it didn't work, but for whatever reason I did not try the LCase...go figure

+ 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