Forum Discussion
HanyTaha
Feb 03, 2024Copper Contributor
color a column based on values of another column
I have the following table in MS office 2016 (excel) to record the work violation No. person ID violation severity 1 1234 violation 1 high 2 1234 violation 2 high 3 1234 vi...
- Feb 03, 2024
For this scenario you can apply this rule for conditional formatting:
=AND(COUNTIFS($B$2:$B$6,B2,$D$2:$D$6,"high")>1,D2="high")
OliverScheurich
Feb 03, 2024Gold Contributor
=COUNTIFS($B$2:$B$6,B2,$D$2:$D$6,"high")>1
You can apply this rule for conditional formatting
=$B$2:$B$6
and this range the format applies to.
- HanyTahaFeb 03, 2024Copper Contributor
Thanks for replying.
Not that exactly what I meant.
I need to highlight 1234 only if its severity is high only.
But in the photo attached, 1234 is highlighted even though its severity is low
Thanks
- OliverScheurichFeb 03, 2024Gold Contributor
For this scenario you can apply this rule for conditional formatting:
=AND(COUNTIFS($B$2:$B$6,B2,$D$2:$D$6,"high")>1,D2="high")
- HanyTahaFeb 04, 2024Copper Contributor
Thanks, OliverScheurich.
It's working fine ☺️