Conditional Formatting: Using OR & AND Statement

Disarmonious

Board Regular
Joined
Oct 31, 2016
Messages
139
Hello,

I want the text to turn red (cell BY6) if these conditions are NOT met;

C6="Apple"
BT6="No"
BZ6<>1

AA6<>"A: Cherry"
AA6<>"A: Strawberry"
AA6<>"A: Watermelon”
AA6<>"A: Orange"
AA6<>"A: Banana"

I was trying to use this formula, but Excel didn't like it; =OR(AA6<>"A: Cherry",AA6<>"A: Strawberry",AA6<>"A: Watermelon”,AA6<>"A: Orange",AA6<>"A: Banana",AND(C6="Apple",BT6="No",BZ6<>1))

Thank you in advance!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
72,989
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Disarmonious

Board Regular
Joined
Oct 31, 2016
Messages
139

ADVERTISEMENT

Hey Fluff,

So when I enter these in, I get this error;
1595009368846.png
when I put the ' before the = sign, it accepts it, but the conditional formatting for these cells don't seem to be functioning (text does not turn red). Is there another way to enter these formulas in that excel will accept without having to add apostrophes?
 

Disarmonious

Board Regular
Joined
Oct 31, 2016
Messages
139

ADVERTISEMENT

So when I enter =AND(AA6<>"A: Cherry",AA6<>"A: Strawberry",AA6<>"A: Watermelon”,AA6<>"A: Orange",AA6<>"A: Banana",AND(C6="Apple",BT6="No",BZ6<>1)) into cell BY6 (which will display a red check mark if those conditions are NOT met), excel prompts that message. I'm wondering if there's another way to enter this formula for the conditional formatting to work?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
72,989
Office Version
  1. 365
Platform
  1. Windows
The quote mark after Watermelon is wrong, it should be a " not a ”
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,471
Messages
5,831,844
Members
430,089
Latest member
beesz

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
Top