Forum Discussion
TheLifeOfJon
Jun 30, 2022Copper Contributor
Cell Colour Changed Based On Two Values
Hello, I have a query… A1 could contain either the text ‘Team One’ or ‘Team Two’. B1 will contain a number. I want the colour of B1 to change, dependant firstly on what Text is in A1 and ...
mtarler
Jun 30, 2022Silver Contributor
Using 6 custom conditional formatting rules you can do this. Select column B then go to conditional formatting, add a new rule, select custom/user defined rule and enter:
=($A1="Team One")*($B1<13)*($B1>=0)
then select the color for that first category.
Use 'Duplicate Rule' (if you have it) and then edit the formula and color format for each of the next 5.
=($A1="Team One")*($B1<13)*($B1>=0)
then select the color for that first category.
Use 'Duplicate Rule' (if you have it) and then edit the formula and color format for each of the next 5.
mtarler
Jun 30, 2022Silver Contributor
NOTE that by applying the $ before the A and B as both Lorenzo and OliverScheurich and I did in the formula, you can make the 'Applied To' range extend over many/all columns to have more or all the rows get highlighted in that color.
Just make sure the the row # you use (as in A1 points to row 1) is that same row as the top row in the Applied To range. So if you only highlight A20:D40 then use $A20 and $B20 instead.