+ Reply to Thread
Results 1 to 12 of 12

Key word contains_Cell Highlight

  1. #1
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Key word contains_Cell Highlight

    Hi,

    I have an excel file attached with two sheets “Master sheet” and “Key words”. I am looking at a macro to highlight the cells in the master sheet where the cells containing the key words from the key words tab. Also, in column C it should give me the key word from which the cell got highlighted.

    For eg: The key word "ABUSE" is the first key word in tab two. Similarly I am looking for a macro to highlight all the rows when the key word found in tab two. Column C "ABUSE"

    Another example: Key word in tab two "UNITED STATES".
    Column C "UNITED STATES"

    Regards,
    Vijay
    Attached Files Attached Files
    Last edited by vijanand1279; 03-12-2012 at 08:09 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Key word contains_Cell Highlight

    hi vijanand1279, please check attachment, press Run.

    The code makes case-insensitive search through the whole keywords list for each item.

    What is the point of colour-highlighting?
    Attached Files Attached Files
    Last edited by watersev; 03-12-2012 at 05:36 AM.

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Key word contains_Cell Highlight

    Does it have to be a macro?

    The attached sheet uses a formula and conditional formatting.
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Key word contains_Cell Highlight

    this is doable without code just a function and conditional formatting
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Key word contains_Cell Highlight

    Thank you so much. This will solve my purpose.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Key word contains_Cell Highlight

    ah cat skinning!

  7. #7
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Key word contains_Cell Highlight

    Ooops I had to open the thread again....When I was looking into all the options through macro or the conditional formatting....It misses few that I looked for. Is it possible to find the result with the key words containing the text.
    For eg. if we search for the key work "tax" then it should pull the rows with "TAXTIME", TAX.COM etc. I did this through the text filter containing. Also through the conditional formatting method did not show the second option. For eg. MORAINE VALLEY COMMUNITY COLLEGE is having both the key words "COMMUNITY" and "COLLEGE".

    Please help

  8. #8
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Key word contains_Cell Highlight

    as to macro solution, please check attachment
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Key word contains_Cell Highlight

    It looks to be good. I tried to check for the key word containing "FOUNDATION" and in our macro it did not pull out the rows where it did not have the complete key word as "FOUNDATION". The master sheet has FOUNDA, FOUNDATI, FOUNDATIO and these rows did not get picked up once I run the macro.

    Could you look into this.

  10. #10
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Key word contains_Cell Highlight

    if keyword is "FOUNDATION" it means the code will look for exact match and not its part or variances

  11. #11
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Key word contains_Cell Highlight

    Yes. the key word is "FOUNDATION" but the text is partial in the master sheet...Is there a way to identify the partial text containing values too.

  12. #12
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Key word contains_Cell Highlight

    may be sort of that
    Attached Files Attached Files

+ 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