Forum Discussion

Phil_Grant_Popi's avatar
Phil_Grant_Popi
Copper Contributor
Oct 16, 2023

Excel, Color Cell A1 green if Cell B1 contains X.

How do I Color Cell A1 green if Cell B1 contains "paid"?

 

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    Phil_Grant_Popi 

    In Excel, you can use conditional formatting to color Cell A1 green based on the content of Cell B1. Here's how you can do it:

    1. Select Cell A1 or the range of cells you want to format based on the content of Cell B1.
    2. Go to the "Home" tab in the Excel ribbon.
    3. Click on "Conditional Formatting" in the "Styles" group.
    4. Choose "New Rule" from the dropdown menu.
    5. In the "New Formatting Rule" dialog box, select "Use a formula to determine which cells to format."
    6. In the "Format values where this formula is true" field, enter the following formula:

    arduinoCopy code

    =B1="paid"

    This formula checks if the value in Cell B1 is equal to "paid."

    1. Click the "Format" button to set the formatting options. In the "Format Cells" dialog, go to the "Fill" tab, and select the green color you desire.
    2. Click "OK" in the "Format Cells" dialog to confirm the formatting.
    3. Back in the "New Formatting Rule" dialog, you'll see a preview of how the formatting will look. Click "OK" to apply the conditional formatting.

    Now, Cell A1 will turn green if the content of Cell B1 is "paid." You can adjust the formatting and the formula as needed for your specific requirements.

Resources