Advanced Cell Conditionals Formatting

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
787
Currently i am working with a spreadsheet that has 18 columns and i am checking the value of c10 cell and then highlighting the row based on that 1 cell.
I would like to improve on this by adding a second color and a second cell reference.

My vision is to check r1c5 and r1c10.
And if c5 is > "0" then potentially set the color to "yellow" AND if c10 is < "2" color the row from c1 to c15 yellow.

The trick is I want all the following rows that have no value in c5 to color the same [only if c10 for that row is < "2" also] until c5 has another value.

Then i want to change the color to "blue" and repeat the scenario.
then on the third set go back to the yellow.

This way I can visually group a set of conditions by alternating colors.

This is beyond me. Can anyone help me work thru this or give me some thing I can try to modify to work?

Thanks -Eds
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Pretty hard to follow and to know what your data and expected results are like. Would this be the correct colouring? If not, clearer explanation & examples might help.
I'm assuming there is, or can be, a heading row.

Excel Workbook
ABCDEFGHIJKLMNOPQR
1
2123332202132113220
323202013202021221
402302023102102221
522313010000222331
631223331301300203
7132322022120101131
800200312233113231
900033130233220023
1011303211012023011
11210320123520113331
1223212021113301322
1321223313202120201
1423320120000111211
15210301121112132222
16300020010200210222
17000222231023212103
18122312113112321322
19320001122310121103
20202001103031130222
21201011003032003203
CF
 
Upvote 0
Sorry that I am not clear - but I think you got it perfect....... So now how do I do that?
 
Upvote 0
Sorry that I am not clear - but I think you got it perfect....... So now how do I do that?
I used column T as a helper column. That column could be hidden after you populate the formulas in it.
T1 hold a 0
T2 formula copied down as far as you might ever need.
Select A2:O?? and apply the Conditional Formatting rules shown.

Excel Workbook
ABCDEFGHIJKLMNOPQRST
10
21233322021321132201
323202013202021221
4023020231021022211
5223130100002223311
631223331301300203
71323220221201011310
800200312233113231
900033130233220023
10113032110120230110
11210320123520113331
1223212021113301322
1321223313202120201
1423320120000111211
15210301121112132222
16300020010200210222
170002222310232121031
181223121131123213220
19320001122310121103
20202001103031130222
212010110030320032031
22
CF
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A21. / Formula is =$T2=0Abc
A22. / Formula is =$T2=1Abc
 
Upvote 0
HI!

Another way (with Peter's sheet layout and without help column):

First Conditional Formatting (with Stop Here option select and without color format):

=IFERROR(MATCH(2,1/(($E$2:$E2>0)*($J$2:$J2>=2))),0)>
IFERROR(MATCH(2,1/(($E$2:$E2>0)*($J$2:$J2<2))),0)


Second Conditional Formatting (with Yellow color format):

=(($E2="")+($E2>0))*($J2<2)*MOD(COUNTIFS($E$2:$E2,">0",$J$2:$J2,"<2"),2)

Third Conditional Formatting (with Blue color format):

=(($E2="")+($E2>0))*($J2<2)*(MOD(COUNTIFS($E$2:$E2,">0",$J$2:$J2,"<2"),2)=0)

Ps: the order of CF is important for the suggestion above to work.

I hope that the formulas above helps.

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,167
Messages
6,129,263
Members
449,497
Latest member
The Wamp

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