• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Text that contains highlighting in conditional formatting, help!!! [SOLVED]

iainmaj

New Member
Hi,


I have 100 words that I want excel to highlight if it finds them in within a cell, not when the cell has that specific text.


I could put each one in using the text contains highlight option, but this would take forever.


I found a formula that works if the cell = a word, but I want it to highlight it if it "contains" a word.


Here it is: =OR(A1="Jon",A1="Fred",A1="Barney",A1="Wilma",A1="Betty",A1="Pebbles",A1="BamBam")


This works if the cell = jon or fred but if it contains jon fred then it is not hightlighted.


I tried "*jon*" ... but this doesn't work either


I can make it highlight the cell if I only search for one term using * but if I try to add another term then it tells me too many arguments.


What I want:


Is a formula like the =OR one above that highlights the cells if they "contain" any of the words in the formula, "not" if the cell = one of the words.


I hope there is a way to put all of the words i want highlighted into one line as I do not want to put all of these in individually one by one ...


Thanks
 
Hi, iainmaj!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about questions in general...


If you haven't performed yet the search herein, try going to the topmost right zone of this page (Custom Search), type the keywords used in Tags field when creating the topic or other proper words and press Search button. You'd retrieve many links from this website, like the following one(s) -if any posted below-, maybe you find useful information and even the solution. If not please advise so as people who read it could get back to you as soon as possible.


And about this question in particular...


Try using this array formula for the condition:

=SUMA(SI.ERROR(ENCONTRAR({"jon";"fred"};A2);0))>0 -----> in english: =SUM(IFERROR(FIND({"jon";"fred"},A2),0))>0


Remember that array formulas should be entered with Ctrl-Shift-Enter instead of just Enter.


Use FIND function for case sensitive search and SEARCH for case insensitive.


Regards!
 
Thanks, it worked :)


I tried to search using the search box/tags ... and the answer wasn't forthcoming.


I reworded the formula to include a named range instead of listing the words in the formula as it would be too long for Excel to accept.


Works perfectly now!
 
Hi, iainmaj!

Glad you solved it. Thanks for your feedback and welcome back whenever needed or wanted.

Regards!
 
Hi SirJB7 + community,


Quick question, extension to this:


I am using the formula =SUM(IFERROR(SEARCH(List,B2:X2),0))>0


With List as a named range.


What do I need to change in the formula in order to return the value true when any cell from B2 to X2 is highlighted?


Basically, what I have done is individually highlighted, through conditional formatting, columns B, C, D.


There are over 1000 rows, so I want to be able to return the value true in column A if any of the cells in the columns to its right are highlighted?


Thanks for reading, helping.
 
Hi, ianinmaj!

You can operate on the conditions used to CF cells, but you can't operate with formulas on conditionally formatted cells.

Regards!
 
In your case [post#5] you could do following:


You can write the formula given by SirJB7 directly in Column A to get the result as TRUE / FALSE.


And in conditional formatting use

A2=TRUE

as condition instead of the formula for coloring.
 
Back
Top