Conditional Formatting for Past Due Date

gymwrecker

Active Member
Joined
Apr 24, 2002
Messages
394
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Need help with a conditional formatting formula that will change the text in B2 to "red" when the date is past the six-month mark.

For example, 15 Mar 23 returns 0 years, 8 Months and 16 days from today (based on the formula in B2.

1701441386801.png


A2=15-Mar-23
B2 = =IF(G5,DATEDIF(G5,TODAY(),"y")&" Years, "&DATEDIF(G5,TODAY(),"ym")&" Months and "&DATEDIF(G5,TODAY(),"md")&" Days","")
 

Attachments

  • 1701441365861.png
    1701441365861.png
    1.4 KB · Views: 6

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
You can simply use the EDATE function to add/subtract 6 months from a date, and then you can compare that date to another date, i.e.
to find if a date is more than six months in the past, if the date being checked is in cell A2, the formula would look like:
Excel Formula:
=A2<EDATE(TODAY(),-6)
 
Upvote 1
Solution

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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