A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

IF OR AND in same conditional formula



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 09:14 PM posted to microsoft.public.excel.worksheet.functions
Ron
external usenet poster
 
Posts: 690
Default IF OR AND in same conditional formula

I'm setting up a conditional formula to use in a conditional format, where
depending on a couple of different conditions, the cell with the date entered
will be color-coded either red, yellow or green.

In this particular formula, I'm using the following variables:
- cell C7 = a percentage (70%)
- cell CI7 = the number of days calculated from today (19)

I've constructed the formula as such (makes sense to me, but Excel doesn't
like it)
=IF(AND(CI7=30,D7=70%),(OR(AND(CI7=90,D7=50%)) )).

Essentially, I'm asking Excel to evaluate two conditions, either of which
would have the conditional format set the cell color to green.

Tried it also as two nested IF statements, but that doesn't work either. A
single IF statement, with no values entered for TRUE or FALSE works fine... I
just want to simplify my conditional formatting formulae by including any
condition that meets my criteria for color coding...

Any ideas??
  #2  
Old May 27th, 2010, 09:47 PM posted to microsoft.public.excel.worksheet.functions
Tom-S[_2_]
external usenet poster
 
Posts: 68
Default IF OR AND in same conditional formula

Try this:

=IF(OR(AND(C17=30,D7=70%),AND(C17=90,D7=50%)), if true statement here,
if false statement here)

If you don't want to use an IF statement overall, try just the OR statement
within the conditional formatting feature (under the Format menu).

"Ron" wrote:

I'm setting up a conditional formula to use in a conditional format, where
depending on a couple of different conditions, the cell with the date entered
will be color-coded either red, yellow or green.

In this particular formula, I'm using the following variables:
- cell C7 = a percentage (70%)
- cell CI7 = the number of days calculated from today (19)

I've constructed the formula as such (makes sense to me, but Excel doesn't
like it)
=IF(AND(CI7=30,D7=70%),(OR(AND(CI7=90,D7=50%)) )).

Essentially, I'm asking Excel to evaluate two conditions, either of which
would have the conditional format set the cell color to green.

Tried it also as two nested IF statements, but that doesn't work either. A
single IF statement, with no values entered for TRUE or FALSE works fine... I
just want to simplify my conditional formatting formulae by including any
condition that meets my criteria for color coding...

Any ideas??

  #3  
Old May 28th, 2010, 04:18 PM posted to microsoft.public.excel.worksheet.functions
Ron
external usenet poster
 
Posts: 690
Default IF OR AND in same conditional formula

Thanks Tom! Worked like a charm!!

"Tom-S" wrote:

Try this:

=IF(OR(AND(C17=30,D7=70%),AND(C17=90,D7=50%)), if true statement here,
if false statement here)

If you don't want to use an IF statement overall, try just the OR statement
within the conditional formatting feature (under the Format menu).

"Ron" wrote:

I'm setting up a conditional formula to use in a conditional format, where
depending on a couple of different conditions, the cell with the date entered
will be color-coded either red, yellow or green.

In this particular formula, I'm using the following variables:
- cell C7 = a percentage (70%)
- cell CI7 = the number of days calculated from today (19)

I've constructed the formula as such (makes sense to me, but Excel doesn't
like it)
=IF(AND(CI7=30,D7=70%),(OR(AND(CI7=90,D7=50%)) )).

Essentially, I'm asking Excel to evaluate two conditions, either of which
would have the conditional format set the cell color to green.

Tried it also as two nested IF statements, but that doesn't work either. A
single IF statement, with no values entered for TRUE or FALSE works fine... I
just want to simplify my conditional formatting formulae by including any
condition that meets my criteria for color coding...

Any ideas??

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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