+ Reply to Thread
Results 1 to 6 of 6

Highlight multiple cells in list if they meet any one stipulation

  1. #1
    Registered User
    Join Date
    11-06-2012
    Location
    Cairo, Egypt
    MS-Off Ver
    Excel 2010
    Posts
    3

    Highlight multiple cells in list if they meet any one stipulation

    Hi All,

    I have a very large list of contacts with company names in an excel sheet. Sometimes there are multiple contacts from a given company, but the company name will be written slightly differently (i.e. one guy writes "Pete's Coffee" and another employee writes "Pete's Coffee Ltd"). Of the total 100 companies listed in my sheet, there are about 20 companies (with minor permutations in the written name) which I would like to visually filter out by having Excel highlight the cell with the company name in it. That way I know to contact the person in that row.

    I've been trying to do it with an OR statement in a conditional formatting rule, but with no luck. A simple 3 company version of the rule I was trying to make looks like this:

    =(OR($D?="*Company 1*",$D?="*Company 2*",$D?="*Company 3*"))

    The *s are there to account for any permutations in the company name recorded by people in this list, and (I think) the ?s are there so that the rule gets applied to every D cell (i.e. my company list). I think this is where my problem lies, but I'm not sure how to fix it. Any better ideas?

    Thanks in advance.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,995

    Re: Highlight multiple cells in list if they meet any one stipulation

    Try selecting all the cells in column D from D2 down (assuming there is a header in row 1).

    Then apply your CF formula, replacing the question marks for 2, hence the formula will relate to cell $D2. It should auto-adjust for the other cells.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    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


  3. #3
    Registered User
    Join Date
    11-06-2012
    Location
    Cairo, Egypt
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Highlight multiple cells in list if they meet any one stipulation

    Thanks TM, that did get me part of the way there. I took your suggestion, but it only worked after I took out the *s in the quoted phrase. I tried it with just the * at the end of the quoted phrase (i.e. "company 1*") but it still wasn't registering any of those cells. This means I can only get excel to read the cells exactly, not allowing for permutations and additions to the end of the cell contents.

    Am I doing something wrong with the *s in the quoted parts?

  4. #4
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Highlight multiple cells in list if they meet any one stipulation

    A small example, see attachment.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    11-06-2012
    Location
    Cairo, Egypt
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Highlight multiple cells in list if they meet any one stipulation

    I'm not sure I understand why the ISNUMBER function makes this work...

  6. #6
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Highlight multiple cells in list if they meet any one stipulation

    It's the MATCH function that makes it work, the ISNUMBER just checks whether MATCH returns a valid result (= a number)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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