Conditional formatting multiple criteria

RedOctoberKnight

Board Regular
Joined
Nov 16, 2015
Messages
150
Office Version
  1. 2016
Platform
  1. Windows
Good Morning,

I have a question about conditional formatting that I'm sure will be an easy solve for most of you. I have the following formula

=AND(OR($Y4="OFF",AND($Y4="OFF",$Z4="OFF")),$A$14="YES").

I'm trying to highlight a row that has either "off" in column Y or "off" in both columns Y & Z. I dont want it to highlight if there is "off" in column Y but column Z contains anything but "off". (The $A$14 reference is to a helper cell to turn off conditional formatting when printing.)

Any help would be much appreciated.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
a bit contradictory possibly in the rules
I'm trying to highlight a row that has either "off" in column Y or "off" in both columns Y & Z. I dont want it to highlight if there is "off" in column Y but column Z contains anything but "off".
This bit
I dont want it to highlight if there is "off" in column Y but column Z contains anything but "off".

SO if "OFF" in column Y , then its dependant on whats in column Z

so is that JUST
AND( Y4="off", Z4 = "off" )

Both Z and Y have to have off

Or am i misunderstanding
 
Upvote 0
So basically 2 conditions.

Y is off and Z is "" (Z contains a formula but defaults to "" if condition isn't met)
Y and Z are both "off"

If Y is off and Z has anything other than a "" or "off" then i dont want it to highlight.

Sorry if my explanation is confusing.
 
Upvote 0
=AND( Y4="OFF", OR ( Z4="OFF", Z4=""))

Book2
ABCDE
4aOFFOFFTRUE
5OFF TRUE
Sheet1
Cell Formulas
RangeFormula
D4:D5D4=IF(A4="","","OFF")
E4:E5E4=AND(C4="off",OR(D4="",D4="off"))
 
Upvote 0
Solution

Forum statistics

Threads
1,213,543
Messages
6,114,238
Members
448,555
Latest member
RobertJones1986

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top