Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 273
Default Conditional nested formatting for cell color changes

I don't completely understand the rules when combining "AND" and "OR"
together in various ways to test various conditions to turn a cell red or
green depending upon the results of the "AND(OR" or "OR(AND" or multiple
nested AND(OR tests. I think I must have my ( ) in the wrong places. How do I
tell Excel which tests I want in the first nested "AND(OR" statement, and
separate the first test from the 2nd "AND(OR", etc. Does it require (( ...)),
ie double parenthesis is certain places to group each test separately? Where
can I go to find some reading material on this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Conditional nested formatting for cell color changes

Hi,

Let's use ((A+B)/(C-D) as an example.

Excel always evaluates from the inner parentheses first, and then from left
to right. Then it works with multiplication and division, and then addition
and subtraction. So in the above example the first things that are done are
A+B and then C-D then the division.

Now to AND and OR

OR(AND(A11,B1="Shane"),AND(C1="Accounting",D1<=TO DAY()))

The inner parenthesis are evaluated first, it does not matter whether the
words are AND or OR. So the left hand AND would return TRUE or FALSE, and
the right hand AND would return TRUE or FALSE. Then the OR is evaluated, it
might be

OR(TRUE,FALSE) answer TRUE - one or the other is true then OR is true
OR(FALSE,FALSE) answer FALSE - neither is true so OR is false
there are other combinations.

If this helps, please click the Yes button.

--
Thanks,
Shane Devenshire


"Gary" wrote:

I don't completely understand the rules when combining "AND" and "OR"
together in various ways to test various conditions to turn a cell red or
green depending upon the results of the "AND(OR" or "OR(AND" or multiple
nested AND(OR tests. I think I must have my ( ) in the wrong places. How do I
tell Excel which tests I want in the first nested "AND(OR" statement, and
separate the first test from the 2nd "AND(OR", etc. Does it require (( ...)),
ie double parenthesis is certain places to group each test separately? Where
can I go to find some reading material on this?

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
Conditional formatting to color rowsbased on cell value ezrecall Excel Discussion (Misc queries) 1 April 18th 08 08:49 PM
Is conditional formatting or formula possible by cell color? J Billy Excel Worksheet Functions 2 June 30th 07 04:43 AM
How can I change cell color using conditional formatting Brian Excel Discussion (Misc queries) 1 September 17th 06 01:38 PM
Conditional Formatting and Cell Color nemadrias Excel Worksheet Functions 7 July 28th 06 05:01 PM
Cell color change without using conditional formatting Trese Excel Discussion (Misc queries) 2 August 26th 05 06:00 PM


All times are GMT +1. The time now is 12:03 PM.

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"