Reputation: 1
I have a column full of different city names. I want to highlight only a few of them. In order words I have a column with New York, Boston, Chicago, Dallas, Salt Lake City, and I only want to highlight New York and Boston. How can I do this with Excel conditional formatting using a formula? I can't figure out the right formula to insert.
Thanks for your help
Upvotes: 0
Views: 54
Reputation: 6549
First select your cells, I assume that New York is in cell A1 and Salt Lake City is in A5. So the selected range is A1:A5. Go to Conditional Formatting -> "Use a formula to determine which cells to format". Choose format and then fill. Choose color. Click ok. Now the formula. Following formula should do the trick:
=$A1="New York"
Create a new one for Boston
=$A1="Boston"
If you wish to have both conditions in one formulas I suggest this formula:
=OR($A1="New York";$A1="Boston")
This mean that if either one cell in the range A1:A5 contain New York OR Boston, that cell will be highlighted
Upvotes: 1