Forum Discussion

PavlosLK's avatar
PavlosLK
Copper Contributor
Feb 15, 2023
Solved

Color cells

How can I color a row when a cell contains a specific value?

  • PavlosLK 

    Let's say you want to color a row from row 2 to row 100 if the cell in column D contains "Yes".

    Select the entire rows 2 to 100.

    The active cell in the selection should be in row 2.

    On the Home tab of the ribbon, click Conditional Formatting > New Rule...
    Select 'Use a formula to determine which cells to format'.
    Enter the formula

     

    =$D2="Yes"

     

    Note that there is a $ sign before the column letter D but not before the row number 2.

    Click Format...
    Activate the Fill tab.
    Select a highlight color.
    Click OK, then click OK again.

4 Replies

  • PavlosLK 

    Let's say you want to color a row from row 2 to row 100 if the cell in column D contains "Yes".

    Select the entire rows 2 to 100.

    The active cell in the selection should be in row 2.

    On the Home tab of the ribbon, click Conditional Formatting > New Rule...
    Select 'Use a formula to determine which cells to format'.
    Enter the formula

     

    =$D2="Yes"

     

    Note that there is a $ sign before the column letter D but not before the row number 2.

    Click Format...
    Activate the Fill tab.
    Select a highlight color.
    Click OK, then click OK again.

Resources