Forum Discussion
mayge03
Dec 21, 2023Copper Contributor
Color fill whole row based on text in certain column
I'm making an assignment tracker for my classes. I want the row to fill a certain color based on the class number (in column i). I've followed videos that show conditional formatting equations to do ...
- Dec 21, 2023
Select rows 2 to 100, or if you prefer A2:K100. The active cell in the selection should be in row 2, for example A2.
Use the following formula in the conditional formatting rule:
=$I2=315
(neither single nor double quotes around 315)
mtarler
Dec 21, 2023Silver Contributor
I'm not sure why you are getting errors in every case but will try to help.
The 'formula' should be made as if you are making it work for the upper left cell in the Applies To range and so you can copy/fill to every other cell in that range. SO in this case I would suggest an applies to range like $A:$K or $A$2:$K$100
In the first case the upper left cell is A1 so the formula should be =($I1=315)
In the second case the upper left cell is A2 so the formula should be =($I2=315)
As for the $s that is what you want to 'lock' so you always want to look at column I but the row should change and match the row of the cell you are checking.
as for "" that "315" or 315 depends on if the values in column I are forced to be TEXT or default to NUMBER. Since the default is if you type 315 into a cell it will default as a number I left the "" off. If you force that column to be TEXT or precede the number with an ' so you enter '315 then it will be text and you need "315". Alternatively you can force the value in the formula to be text or have excel try to convert it to a number:
=(TEXT($I2,"0")="315")
The 'formula' should be made as if you are making it work for the upper left cell in the Applies To range and so you can copy/fill to every other cell in that range. SO in this case I would suggest an applies to range like $A:$K or $A$2:$K$100
In the first case the upper left cell is A1 so the formula should be =($I1=315)
In the second case the upper left cell is A2 so the formula should be =($I2=315)
As for the $s that is what you want to 'lock' so you always want to look at column I but the row should change and match the row of the cell you are checking.
as for "" that "315" or 315 depends on if the values in column I are forced to be TEXT or default to NUMBER. Since the default is if you type 315 into a cell it will default as a number I left the "" off. If you force that column to be TEXT or precede the number with an ' so you enter '315 then it will be text and you need "315". Alternatively you can force the value in the formula to be text or have excel try to convert it to a number:
=(TEXT($I2,"0")="315")