Conditional formatting with or function, not case sensitive...

Dan1000

Board Regular
Joined
Nov 4, 2006
Messages
205
Is there a formula I can use to search cells in a column for say 3 specific words whether they be on their own or in a text string. I'd like to search for up to 10 words but perhaps this is not possible?!

I have used isnumber(find, but can not get it to work with the or function,

I have used the or function on its own but I can not get it to work,

I have used the countif function but can not get it to work with the or function



Any help would be much appreciated


Dan
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
42,233
Office Version
365
Platform
Windows
Can you explain just how this relates to Conditional Formatting?

Perhaps we could have a small set of sample data & your explanation of just what you want in relation to that sample data?
 

Dan1000

Board Regular
Joined
Nov 4, 2006
Messages
205
Is there a formula I can use to search cells in a column for say 3 specific words whether they be on their own or in a text string. I'd like to search for up to 10 words but perhaps this is not possible?!

I have used isnumber(find, but can not get it to work with the or function,

I have used the or function on its own but I can not get it to work,

I have used the countif function but can not get it to work with the or function.

I need to highlight more than two items in specific columns which I can then sort by their colour. It is particularly important that I can find text on its own or in a string and with or without Capitals - I note is(number is case sensitive.

Unfortunately the filter in excel only allows two filter items.

Not sure how to add image alhtough I created one and do not think it wold add much if any detail to what I have explained above.

If you can advise on how to add examples from Excel then that would be helpful as I find the MrExcel Forum useful and no doubt would benefit from learning how to do that.


Any help would be much appreciated


Dan
 
Last edited:

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,338
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
If you don't want it to be case sensitive, use SEARCH rather than FIND. For multiple words, you could use:

=COUNT(SEARCH(list_of_words_here, Cell_to_check))

syntax. So, for example:

=COUNT(SEARCH(Z1:Z10,A2))

to search for any of the text in Z1:Z10 within A2.
 

Dan1000

Board Regular
Joined
Nov 4, 2006
Messages
205
If you don't want it to be case sensitive, use SEARCH rather than FIND. For multiple words, you could use:

=COUNT(SEARCH(list_of_words_here, Cell_to_check))

syntax. So, for example:

=COUNT(SEARCH(Z1:Z10,A2))

to search for any of the text in Z1:Z10 within A2.

Hi RoryA

Thank you.

It looks as though you mean to create a list of words for the formula to look up whereas I mean to place the words, probably within quotes, within the conditional formatting formula itself.

Any ideas?!
 
Last edited:

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,338
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
You can do that but it makes your life harder, not least in terms of maintaining the workbook.

You'd have to use something like:

=COUNT(SEARCH("word1",A2),SEARCH("word2",A2))
 

Dan1000

Board Regular
Joined
Nov 4, 2006
Messages
205
You can do that but it makes your life harder, not least in terms of maintaining the workbook.

You'd have to use something like:

=COUNT(SEARCH("word1",A2),SEARCH("word2",A2))

Hi Rory

Thats wierd - I tried your method which seems to be what I am looking for, only it found several blank cells and cells without the specific words I put in. Perhaps I'm doing something wrong although I checked and double checked and I can't see anything wrong.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,338
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Did you have a2 selected when adding the formula?
 

Dan1000

Board Regular
Joined
Nov 4, 2006
Messages
205
Trying several times, I highlighted the whole column and placed dollar signs in front of the column and row numbers (selection criteria) and then placed the formula into the formula bar without dollar signs and it suddenly worked. Why it decidied to work this time and not before I don't know as I can not see what difference/s I made from my previous tries.

Incidently, I highlighted the top cell in the column on several tries and it did not work - I beleive the whole column needs to be highlighted in order for the formula to search the whole column although some formula only require the first cell I know.
 

Forum statistics

Threads
1,081,969
Messages
5,362,484
Members
400,677
Latest member
champchamp

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top