formula for conditional formatting and dates

jocelzn

New Member
Joined
Aug 16, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
What formula can I use in conditional formatting to change the color of cells if today's date is within 30 days of the date in the cell?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Welcome to the Board!

If the date is in cell A1, maybe something like:
Excel Formula:
=A1-TODAY()<30
or
Excel Formula:
=TODAY()-A1<30
depending on which way you are going (it isn't quite clear from your question if you mean less than 30 days before or after).
 
Upvote 0
Note if you want to make sure it is positive, you may need to use AND and add a second condition, i.e.
Excel Formula:
=AND(A1-TODAY()>0,A1-TODAY()<30)
 
Upvote 0

Forum statistics

Threads
1,216,077
Messages
6,128,685
Members
449,463
Latest member
Jojomen56

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top