Conditional Formatting over multiple cells

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
Office Version
  1. 365
Hi again

In Columns I, L and O I have various drop down options (4 in total)

If these dropdowns are any combination of either "Approved" or "Not Applicable" I need to turn the row green

If the row contains one of the other values "Open" or "Escalated" (or blank) the line should remain free of being coloured in

Thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
select the row you want to colour
Then use a formula
=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))

Book8
ABCDEFGHIJKLMNOPQR
1
2TRUEapprovednot applicableapproved
3not applicableapproved
4approvedapproved
Sheet1
Cell Formulas
RangeFormula
B2B2=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:R5Expression=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))textYES


for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
A2:AA100 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK
 
Upvote 0
select the row you want to colour
Then use a formula
=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))

Book8
ABCDEFGHIJKLMNOPQR
1
2TRUEapprovednot applicableapproved
3not applicableapproved
4approvedapproved
Sheet1
Cell Formulas
RangeFormula
B2B2=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:R5Expression=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))textYES


for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
A2:AA100 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK
Superb - thank you - that has saved me a lot of frustrating as was near the solution, but not quite!
 
Upvote 0
Hi

Sorry, cannot edit - but I have one row that in I L and O the "answers" are all "Approved" but it is not turning the light green. (Lines with a combination appear to work.


select the row you want to colour
Then use a formula
=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))

Book8
ABCDEFGHIJKLMNOPQR
1
2TRUEapprovednot applicableapproved
3not applicableapproved
4approvedapproved
Sheet1
Cell Formulas
RangeFormula
B2B2=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:R5Expression=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))textYES


for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
A2:AA100 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=AND(OR($I2="Approved",$L2="approved",$O2="approved"),OR($I2="Not applicable",$L2="Not applicable",$O2="Not applicable"))

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK
 
Upvote 0
Ignore - need to rethink

are OK, i thought it had to have both
Approved and Not applicable

So if it just has 1 approved - then is that green
or 1 not applicable

This will turn green if any cell has approved OR not applicable
=OR($I2="Approved",$L2="approved",$O2="approved",$I2="Not applicable",$L2="Not applicable",$O2="Not applicable")

BUT if you have any cells that are
"Open" or "Escalated" or blank then its not green

let me rethink that
 
Upvote 0
are OK, i thought it had to have both
Approved and Not applicable

So if it just has 1 approved - then is that green
or 1 not applicable
So it can be ANY combination of Approved or Not applicable (think I have covered all scenarios :) )

ApprovedApprovedApproved
ApprovedApprovedNot applicable
ApprovedNot applicableApproved
Not applicableApprovedApproved
ApprovedNot applicableNot applicable
Not applicableApprovedNot applicable
Not applicableNot applicableApproved
Not applicableNot applicableNot applicable
 
Upvote 0
so all the above are GREEN - anything else if not coloured
 
Upvote 0
so all the above are GREEN - anything else if not coloured
Yes - (albeit I have missed a combination of those two values) - there maybe a possibility of a 3rd option of "Expired" to be added at a later date, but was just hoping I could add an extra OR statement.
 
Upvote 0
sorry, more complicated then first read - my fault

What are the values

Blank
Open
Escalated
Expired
Approved
Non Applicable

green ONLY if ALL 3 cells have a combination of
Approved
OR
Non Applicable
Everything else is blank

so if we count the contents of a cell - then it should= 3 as, we have to have all 3 cells populated with those 2 words
i can do with a helper , using an array formula - which is not allowed in conditional formatting, so it will be much longer
maybe a sumproduct
BUT can we just try with a helper column and SEE if that does give the result you need and if so look at not using a helper later
OR another member may read and answer

The formula i'm looking at is
=SUM((COUNTIF($I13,{"Approved","not applicable"})))+SUM((COUNTIF(L13,{"Approved","not applicable"})))+SUM((COUNTIF($O13,{"Approved","not applicable"})))
and so that must be 3 to be green


Book8
ABCDEFGHIJKLMNOPQR
1
2ApprovedApprovedApproved3
3ApprovedApprovedNot applicable3
4ApprovedNot applicableApproved3
5Not applicableApprovedApproved3
6ApprovedNot applicableNot applicable3
7Not applicableApprovedNot applicable3
8Not applicableNot applicableApproved3
9Not applicableNot applicableNot applicable3
10ApprovedApproved2
11ApprovedApprovedNot applicable3
12ApprovedopenApproved2
13Not applicableApprovedApproved3
14escaletedNot applicableNot applicable2
15Not applicableApprovedNot applicable3
16Not applicableexpiredApproved2
17Not applicableNot applicableopen2
Sheet1
Cell Formulas
RangeFormula
R2:R17R2=SUM((COUNTIF($I2,{"Approved","not applicable"})))+SUM((COUNTIF(L2,{"Approved","not applicable"})))+SUM((COUNTIF($O2,{"Approved","not applicable"})))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:R17Expression=$R2=3textNO
 
Upvote 0

Forum statistics

Threads
1,215,529
Messages
6,125,344
Members
449,219
Latest member
Smiqer

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