evenyougreg
evenyougreg

Reputation: 49

How to color specific cells if another cell contains a string in Excel?

I am trying to change the fill and font color of only A2 and B2 if E2 contains the string "departments" for example.

I have found formulas that highlight the whole row, but I only want select cells of the row while actually formatting with colors, and I can't quite get it right with conditional formatting.

Any help would be appreciated.

Upvotes: 0

Views: 2559

Answers (1)

BigBen
BigBen

Reputation: 49998

Use a rule based on the following formula:

=SEARCH("departments",$E1)>0

and apply it to columns A and B.

enter image description here

You can also simplify the formula to just =SEARCH("departments",$E1)

Upvotes: 1

Related Questions