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

Dan1000

Board Regular
Joined
Nov 4, 2006
Messages
210
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
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
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?
 
Upvote 0
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:
Upvote 0
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.
 
Upvote 0
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:
Upvote 0
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))
 
Upvote 0
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.
 
Upvote 0
Did you have a2 selected when adding the formula?
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top