Conditional formatting using named range as criteria

dsbh

New Member
Joined
Aug 19, 2010
Messages
3
Hello! I need to use a named range of words ("wordlist"):

red
green
blue
etc...

And I need to search for ANY cell in another sheet that may contain any of these words (at the beginning, middle, or end of a string), and highlight that cell in red.

I'm using Excel 2010, and I can't get my =COUNTIF(wordlist,A2) formula (with A2 being the start of the target data) to work with wildcards. It will only find cells that START with any of the strings int he named range used for searching.

Any help is appreciated!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Ha! Thank you very much for the quick reply.

This worked, but it formatted the entire sheet red, leaving the cells containing words un-highlighted. How do I flip this result so only the cells with a hit are formatted?
 
Upvote 0
Just a guess, but try reversing the <
Rich (BB code):
SUMPRODUCT(COUNTIF(A1,"*"&wordlist&"*")) > 0

lenze
 
Upvote 0
Perfect! Thanks to mikerickson and lenze! At least I learned a lot about COUNTIFs today... :)
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

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