Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Using Logical OR on text in Conditional Formatting

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 red
If string does not contain "yibble" or "wibble" then make bold
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.

Thanks

Darius

---
frmsrcurl: http://msgroups.net/microsoft.public...heet.functions
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default Using Logical OR on text in Conditional Formatting

Try a formula of

=OR(A2="foo",A2="bar")

=AND(A2<"yibble",A2<"wibble")

HTH

Bob

"Darius Poli" / wrote in message
...
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 red
If string does not contain "yibble" or "wibble" then make bold
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.

Thanks

Darius

---
frmsrcurl: http://msgroups.net/microsoft.public...heet.functions



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Using Logical OR on text in Conditional Formatting

Hi,

CF rule for is there

=OR(ISNUMBER(SEARCH("Foo",A1)),ISNUMBER(SEARCH("Ba a",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(S EARCH("Baa",A1))))

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Darius Poli" wrote:

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 red
If string does not contain "yibble" or "wibble" then make bold
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.

Thanks

Darius

---
frmsrcurl: http://msgroups.net/microsoft.public...heet.functions
.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Using Logical OR on text in Conditional Formatting

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.

Thanks

Darius


---
frmsrcurl: http://msgroups.net/microsoft.public...nal-Formatting
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default Using Logical OR on text in Conditional Formatting

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

"Darius Poli" / wrote in message
...
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.

Thanks

Darius


---
frmsrcurl:
http://msgroups.net/microsoft.public...nal-Formatting



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using wildcards with logical (IF, AND) conditional formatting olddog Excel Worksheet Functions 2 February 5th 10 10:28 PM
Conditional Formatting: Logical AND fails to work with INDIRECT(.. Hamish Excel Worksheet Functions 5 May 15th 08 04:54 PM
Conditional Formatting based on text within a cell w/ text AND num Shirley Excel Worksheet Functions 2 December 22nd 06 01:40 AM
Excel Conditional Formatting color multiple cells for 1 logical LDUNN1 Excel Worksheet Functions 2 October 23rd 06 02:12 PM
Can logical operators be used within Conditional Formatting? Rumpa Biswas Excel Discussion (Misc queries) 6 January 2nd 06 10:58 AM


All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"