using a check box to trigger a row and font color change


Posted by kh on September 19, 2001 1:10 PM

I want to use a check box in a row to change the row color to black and the text color to white as soon as the box is checked (TRUE).

Any help with a formula?

Posted by Jay on September 19, 2001 6:25 PM

I'd suggest doing it using Conditional Formatting.

First add the check box, right click on it and pick the "Control" tab. In the "Cell link:" window enter a cell in the row you want to change color (like cell A1). When you do that, cell A1 will say "TRUE" if the check box is checked, "FALSE" if it isn't checked.

Next select Row 1 (the whole row) and pick "Conditional Formatting..." from the Format menu. In the upper left part of that window is a box to pick either "Cell Value Is" or "Formula Is." Select "Formula is" and then add the following in the box to the right of it: =$A1=TRUE()

Finally, click on the "Format..." button (still in the Conditional Formatting window). Another window will open with tabs to allow you to format the Font, Borders and Patterns. Use the "Font" tab to change the text color to white and the Patterns tab to change the color shading to black. When done, click on "OK" and click "OK" to close the Conditional Formatting window.

Checking the check box should change the entire row to black with white text.

Jay



Posted by kh on September 20, 2001 5:24 AM

THANKS JAY--IT WORKED OUT GREAT