+ Reply to Thread
Results 1 to 9 of 9

Match and Highlight Characters in a Range

  1. #1
    Registered User
    Join Date
    02-16-2007
    Posts
    58

    Match and Highlight Characters in a Range

    I want to create a formula that matches certain characters typed by a users input.

    If Brian is typed in a cell, I want it to search a range and highlight those names that start with Brian. Even if there are more characters after Brian.

    Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Select range B5:B23 and go to Format|Conditional Formatting

    Select Formula Is from 1st drop down menu and enter formula: =SEARCH($E$5,$B5)

    click Format and select colour from Pattern tab.

    Click Ok.

    Click Ok.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-16-2007
    Posts
    58
    That is great, but can I make it start at the start of the line of text for the search?

    Bill
    Rob

    Search for B and make sure it starts at left of the text so it finds Bill first or all names that start with B and not include Rob.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    use formula:

    =Left($B5,"B") you can replace "B" with cell reference housing the letter.

    or if you want the name in E5 to start at the left..

    =Left($B5,Length($E$5))=$E$5

  5. #5
    Registered User
    Join Date
    02-16-2007
    Posts
    58
    I can't seem to get it. Sorry

    How would the second formula you wrote look with the first formula you wrote in the conditional format menu?

    This is what I have and it is not working

    =SEARCH(LEFT($B5,Length($E$5))=$E$5,$B5)

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Just use the formula (ie. replace previous formula):

    =Left($B5,Length($E$5))=$E$5


    It doesn't need to be put in the Search() function...

  7. #7
    Registered User
    Join Date
    02-16-2007
    Posts
    58
    This is what I have and it does not seem to work. Sorry, I am not sure what I am doing wrong.
    Attached Files Attached Files

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Sorry.... my bad.... Length should just be LEN.... I should have tested that...

    =LEFT($B5,LEN($E$5))=$E$5

  9. #9
    Registered User
    Join Date
    02-16-2007
    Posts
    58
    Works great now, THANKS!!!!

+ 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