ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   word match in string text in cell, color format cell (https://www.excelbanter.com/excel-discussion-misc-queries/164237-word-match-string-text-cell-color-format-cell.html)

jpmahony

word match in string text in cell, color format cell
 
Hi,

I want to colour format a range of cells. The critiae for color coding the
cells depends upon a name , ie if a string of text in a cell refers to a
name, colour format the cell for example green. Conditional formatting doesnt
seem to work as the condition is too complex, i think. ie example below if a
string of text in a cell contains either of the names andrea, robert or john
, color the cell green , if a cell contains either of the names bob or jack
color format the cell blue.

RagDyeR

word match in string text in cell, color format cell
 
Select the range, say A1 to A50, with A1 the cell in focus (colored white).

Then,
<Format <Conditional Format
Change "Cell Value Is" to "Formula Is", and enter this:

=OR(A1="andrea",A1="robert",A1="john")

Click on <Format, and choose your color,
Then <OK,
Then click on <Add to enter your second condition.

Change "Cell Value Is" to "Formula Is", and enter this:

=OR(A1="bob",A1="jack")

Click on <Format, and choose your second color,
Then <OK <OK
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===



"jpmahony" wrote in message
...
Hi,

I want to colour format a range of cells. The critiae for color coding the
cells depends upon a name , ie if a string of text in a cell refers to a
name, colour format the cell for example green. Conditional formatting
doesnt
seem to work as the condition is too complex, i think. ie example below if a
string of text in a cell contains either of the names andrea, robert or john
, color the cell green , if a cell contains either of the names bob or jack
color format the cell blue.




All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com