Forum Discussion

Daniel Cook's avatar
Daniel Cook
Copper Contributor
Aug 24, 2017

How do I make excel change the colour of a cell depending on a different cells date?

Hi,

 

How do I make excel change the colour of a cell depending on a different cells date?

 

Turn A2 red if - E2 cell is smaller than todays date

Turn A2 yellow with red outline if - E2 cell is equal to todays date

Turn A2 clear if - E2 cell is bigger than the current date

 

  • tmcmahon71 

    Let's say you want to highlight a row if column F contains "Closed".

    Use the formula

     

    =$F2="Closed"

     

    If you want something different, please provide more detailed information.

    • Hello,

       

      column E does not have dates. Column F does, and so does column H. In the following I assume you want to use the date in column F. Change the formula to use H if you want to. 

       

      1. Select cell A2
      2. click Conditional Formatting on the Home ribbon
      3. click New Rule
      4. click Use a formula to determine which cells to format
      5. click into the formula box and enter the formula
        =$F2<Today()
      6. click the Format button and select a red color
      7. close all dialogs

      Repeat the steps and use the formula

       

      =$F2=Today()

      and select a yellow fill and red border.

       

      Next, select cell A2 again, click the Format Painter in the home ribbon, then select all other cells below cell A2.

       

      Does that help?

  • Hi Daniel,

     

    In your screenshot there is no any date in E2. But in general

    Stay on A2, Home->Conditional formatting->Manage rules->New ruke; use for the ruke

    =$E2<=TODAY()

    Format, apply any formatting you want. After that apply the rule to entire range (e.g. $A$2:$A$10), or keep only A2.

     

    Repeat for each color /condition you'd like to have

     

     

     

     

Resources