Color Rows Differently For Each Keyword In Column

  • I need to run a macro to start a search in H3 (and continue down the column) and search for one of many words, let's say word1, word2,word3,word4,word5,word6,word7,word8,word9,and word10.
    depending on the word that is found, color the entire row. colors don't matter as long as they are different.
    $10

  • Re: Color Rows Differently For Each Keyword In Column


    Try the code below after modification of needed words;

  • Re: Color Rows Differently For Each Keyword In Column


    Hi


    You could use a custom function like presented below.



    The Choose function is an alternative if you want to condense the notation.


    Wigi

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

  • Re: Color Rows Differently For Each Keyword In Column


    Follow-up question by Peyton by means of PM.


    wigi-


    I would like to use the following code, but with wildcards, if possible.


    <from your previous code>
    WordList = Array("word1", "word2", "word3", "word4")


    to something like


    WordList = Array("*word1*", "*word2*", "*word3*", "*word4*")

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

  • Re: Color Rows Differently For Each Keyword In Column


    You need to change the code to achieve this. The Like operator seems to be a logical choice for this:



    Wigi

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --