+ Reply to Thread
Results 1 to 7 of 7

how can I use conditional formatting with multiple text criteria ?

  1. #1
    Registered User
    Join Date
    12-27-2021
    Location
    London, England
    MS-Off Ver
    last
    Posts
    2

    Cool how can I use conditional formatting with multiple text criteria ?

    Hello !

    I am trying to use conditional formatting with multiple text criteria. All the cells of my table include different words in this format : "XXX; YYY; VVV, WWW".
    I would like, with one conditional formatting formula, to be able to highlight the cells containing "XXX" and "YYY", that are amongst the other words, in all the cells of one column, but I can't really find a formula to do it.

    For example, the word "acanthe" needs to be found in the 3 cells : "Acanthe", "Acanthe à feuilles molles" and "Acanthe épineuse".

    I here attach an example of a table, in wish to search for the words "Abutilon, Acanthe, Achillée, Aconit, Adonis, Ail, Alchémille, Anémone" amongst the cells of column "C".

    Do you think you could help me ?
    Thanks a lot++


    (sorry, I had forgotten the attached table)
    Attached Files Attached Files
    Last edited by Md92; 12-27-2021 at 06:01 AM. Reason: forgot the attached table !

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland... but I could be anywhere in the world
    MS-Off Ver
    Office 365 for PC.
    Posts
    34,085

    Re: how can I use conditional formatting with multiple text criteria ?

    Not sure, but is this what you wanted??

    =SUMPRODUCT(--(NOT(ISERR(SEARCH($A$1:$A$8,$C1)))))>0

    It highlights cells with any of the values in A1 to A8 contained within...
    Attached Files Attached Files
    Glenn



  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland... but I could be anywhere in the world
    MS-Off Ver
    Office 365 for PC.
    Posts
    34,085

    Re: how can I use conditional formatting with multiple text criteria ?

    If so... will the number of search terms ALWAYS be 8? If not, a tweak is needed.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,401

    Re: how can I use conditional formatting with multiple text criteria ?

    Formula for CF:

    =COUNT(SEARCH($A$1:$A$8,C1))

    Or:

    =SUMPRODUCT(COUNTIF(C1,"*"&$A$1:$A$8&"*"))
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland... but I could be anywhere in the world
    MS-Off Ver
    Office 365 for PC.
    Posts
    34,085

    Re: how can I use conditional formatting with multiple text criteria ?

    With a Named Range (called Range), CTRL-F3 to view/edit:
    =gènes!$A$1:INDEX(gènes!$A:$A,MATCH("Zzzz",gènes!$A:$A))

    the CF formula becomes:
    =SUMPRODUCT(--(NOT(ISERR(SEARCH(Range,$C1)))))>0

    and will adjust automatically to include any number of values in column A.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-27-2021
    Location
    London, England
    MS-Off Ver
    last
    Posts
    2

    Re: how can I use conditional formatting with multiple text criteria ?

    It works perfectly, thank you very much !!!

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... based in Ireland... but I could be anywhere in the world
    MS-Off Ver
    Office 365 for PC.
    Posts
    34,085

    Re: how can I use conditional formatting with multiple text criteria ?

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. AND/OR Conditional Formatting with Multiple Criteria
    By Kirbstomp1287 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2020, 04:42 AM
  2. [SOLVED] Conditional Formatting on column based on multiple Text criteria
    By Rellsunn in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-22-2017, 12:38 PM
  3. [SOLVED] Conditional Formatting over multiple cells with multiple criteria validator
    By effendrew in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-31-2015, 05:05 PM
  4. Conditional formatting based on multiple text criteria
    By tanyaslater in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-01-2014, 10:27 PM
  5. Replies: 5
    Last Post: 12-28-2012, 02:06 PM
  6. Conditional Formatting with multiple AND/OR criteria
    By camdameron in forum Excel General
    Replies: 7
    Last Post: 11-02-2010, 02:03 PM
  7. [SOLVED] conditional formatting, multiple criteria
    By Lara in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-27-2006, 01:45 PM

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