Conditional Formatting of Dates in Excel

前端 未结 2 1251
半阙折子戏
半阙折子戏 2021-01-28 20:54

I am trying to make conditional formatting for Dates in Excel. The cells should change the color depeding on when the Date is due. If it is due in less than 30 days it should

相关标签:
2条回答
  • 2021-01-28 21:16

    Ok, Excel does some wacky stuff that it thinks is helpful when you're trying to apply conditional formatting to a range (it's usually more of a hindrance than help).

    Follow these steps:

    1. Select the first cell with a date value in it, I'm assuming E2.
    2. Click on Conditional Formatting -> New Rule.
    3. Select "Use a formula to determine which cells to format".
    4. Paste in the formula =DATEDIF(TODAY(),E2,"d")<30 and select whatever formatting options you want. Click OK.
    5. Go back into conditional formatting by clicking on "Manage Rules".
    6. In the Applies to field, change it to =E2:E200, or whatever the last row of the range is. Alternatively you can use a named range if you want to set up something a little more dynamic.

    That rule now applies to the whole range.

    0 讨论(0)
  • 2021-01-28 21:22

    I used the following formulas:

    =DATEDIF(TODAY(),E2,"d")<30
    =DATEDIF(TODAY(),E2,"d")<60
    =DATEDIF(TODAY(),E2,"d")<90
    
    0 讨论(0)
提交回复
热议问题