ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Formatting OR Expression?? (https://www.excelbanter.com/excel-discussion-misc-queries/27713-conditional-formatting-expression.html)

SMac

Conditional Formatting OR Expression??
 
I am using all 3 conditions so is there a way to combine these 2 lines of
code into 1 condition? They both result in turning the cell red:

'(this line looks to see if there is a percent other than 0 or 100 and
calculates the percent where we should be versus the actual, cell H33)
=IF(AND(H330%,H33<100%),(H33<=((H32-$C$2)/$H$8)))
OR
=IF(H33=0%,(H32-$C$2)<$H$8)
'(this line looks to see if there are still enough days to complete)

Cell H33 is a % Comp, H32 is End Date, $C$2 is Today's Date and $H$8 is #
days to complete, just FYI.

THANKS!!
Stacey

Bob Phillips

Do an OR

=OR(cond1,cond2)

--
HTH

Bob Phillips

"SMac" wrote in message
...
I am using all 3 conditions so is there a way to combine these 2 lines of
code into 1 condition? They both result in turning the cell red:

'(this line looks to see if there is a percent other than 0 or 100 and
calculates the percent where we should be versus the actual, cell H33)
=IF(AND(H330%,H33<100%),(H33<=((H32-$C$2)/$H$8)))
OR
=IF(H33=0%,(H32-$C$2)<$H$8)
'(this line looks to see if there are still enough days to complete)

Cell H33 is a % Comp, H32 is End Date, $C$2 is Today's Date and $H$8 is #
days to complete, just FYI.

THANKS!!
Stacey




SMac

I am not sure how to combine them, how would that look?

"Bob Phillips" wrote:

Do an OR

=OR(cond1,cond2)

--
HTH

Bob Phillips

"SMac" wrote in message
...
I am using all 3 conditions so is there a way to combine these 2 lines of
code into 1 condition? They both result in turning the cell red:

'(this line looks to see if there is a percent other than 0 or 100 and
calculates the percent where we should be versus the actual, cell H33)
=IF(AND(H330%,H33<100%),(H33<=((H32-$C$2)/$H$8)))
OR
=IF(H33=0%,(H32-$C$2)<$H$8)
'(this line looks to see if there are still enough days to complete)

Cell H33 is a % Comp, H32 is End Date, $C$2 is Today's Date and $H$8 is #
days to complete, just FYI.

THANKS!!
Stacey





Dave Peterson

It looks like this might work (well, to me!):

=OR(AND(H330%,H33<100%),AND(H33=0%,(H32-$C$2)<$H$8))



SMac wrote:

I am using all 3 conditions so is there a way to combine these 2 lines of
code into 1 condition? They both result in turning the cell red:

'(this line looks to see if there is a percent other than 0 or 100 and
calculates the percent where we should be versus the actual, cell H33)
=IF(AND(H330%,H33<100%),(H33<=((H32-$C$2)/$H$8)))
OR
=IF(H33=0%,(H32-$C$2)<$H$8)
'(this line looks to see if there are still enough days to complete)

Cell H33 is a % Comp, H32 is End Date, $C$2 is Today's Date and $H$8 is #
days to complete, just FYI.

THANKS!!
Stacey


--

Dave Peterson


All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com