Forum Discussion

pmayes's avatar
pmayes
Copper Contributor
Mar 07, 2026

change background color

I have a worksheet, using column b9:f550 with the cells having a background color of blue.  Col B is empty of data.  whenever I put a S or P in column B, ( b9 example, I want the background color to change in b9, c9, d9, e9, f9 to white.   is there a way that this will automatically change to white whenever I add a S or P in the B col? 

1 Reply

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    Yes, you can do this automatically using Conditional Formatting with a formula. Here's how to set it up:

    Steps to create the automatic color change:

    Select the range you want to format:

    Click and drag to select B9:F550

    Open Conditional Formatting:

    Go to the Home tab

    Click Conditional Formatting > New Rule

    Choose rule type:

    Select "Use a formula to determine which cells to format"

    Enter the formula:

    =OR($B9="S",$B9="P")

    (Note the $ before B - this locks column B but allows the row to change)

    Set the formatting:

    Click the Format button

    Go to the Fill tab

    Choose White

    Click OK

    Apply the rule:

    Click OK to close the New Rule dialog

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

     

    Was the answer useful? Mark as best response and like it!

    This will help all forum participants.