Using Logical OR on text in Conditional Formatting

  • Thread starter Thread starter Darius Poli
  • Start date Start date
D

Darius Poli

I have a column with various text entries. I have created a conditional formatting rule for each type of entry but the formatting can be grouped together, so I would like a Conditional Formatting rule that says

If string contains "foo" or "bar" then colour re
If string does not contain "yibble" or "wibble" then make bol
etc

Any idea how I can do this rather thasn having to manage over 30 rules with each one looking for a single text entry type

Thank

Darius
 
Hi,

CF rule for is there

=OR(ISNUMBER(SEARCH("Foo",A1)),ISNUMBER(SEARCH("Baa",A1)))

CF rule for both not there
=AND(NOT(ISNUMBER(SEARCH("Foo",A1))),NOT(ISNUMBER(SEARCH("Baa",A1))))

CF rule for only 1 there

=OR(NOT(ISNUMBER(SEARCH("Foo",A1))),NOT(ISNUMBER(SEARCH("Baa",A1))))

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
Thanks for the useful hints but I need a little more help I'm afraid

Column A contains a list of text items and I want to colour them based on the entry, for each entry, so I cannot use references to individual cells

I tried setting the CF as =OR($A$1:$A$nn="text",...) but that will format things based on the data in the entire column

What I want to say is, for any cell, if that cell has text "xxx", format one way, if it has text "yyy", format a different way. For a large range of cells with changing values

Thank

Darius
 
I think the formula that I gave you will work if you are looking at full
cell content, or Mike's formula if partial cell content. Just select all the
cells at the start.

HTH

Bob
 
Back
Top