Conditional Formatting - Expiry Date

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,831
Office Version
  1. 2010
Platform
  1. Windows
Hello, I have expiry dates in Column F which start in cell F6, (there are some blanks if that's going to be a factor). What would the formula be to tell me if the expiry date is within 15 months of todays date please...? I know how to enter the formula in to conditional formatting, I just can't work out the formula I need.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
highlight All dates that are 15mth in the future or less than today and include dates in past

=AND(F6<>"", F6<DATE(YEAR(TODAY()),MONTH(TODAY())+15,DAY(TODAY())))
Will do the Past up to 15mth in future
F6<>"" stos blank cells highlighting as they are seen as a date 1/1/1900

Only if date greater than today and less that 15mths in future
=AND(F6<DATE(YEAR(TODAY()),MONTH(TODAY())+15,DAY(TODAY())),F6>TODAY())
Will do greater than today up to 15mths in future

If more than 1 column to be highlighted , use a $
=AND($F6<DATE(YEAR(TODAY()),MONTH(TODAY())+15,DAY(TODAY())),$F6>TODAY())
 
Last edited:
Upvote 0
=DATE(YEAR(TODAY()),MONTH(TODAY())+15,DAY(TODAY()))

will highlight All dates that are 15mth in the future or less than today and include dates in past
Thanks for that, the 15 months in the future will mess things up with the highlighting but I can't work out how to amend the formula...
 
Upvote 0
Edited my post

sorry not sure i understand
can you explain
maybe terminology
Is the date in F6 to be highlighted less than 15 months in future ?
OR
PAST

what exactly
if the expiry date is within 15 months of todays date please.
Within ???
so some example dates to be highlighted
 
Upvote 0
I'm confused now...! So today is 05 May 2021... 15 months before today is 05 Feb 2020... So I need to highlight any dates between those dates...
 
Upvote 0
OK so past,

This is in the past
From yesterday 4th May 21 to 6th feb 2020
=AND(F6>DATE(YEAR(TODAY()),MONTH(TODAY())-15,DAY(TODAY())),F6<TODAY())

If you want to include today and the 5th Feb 2020 then an = also needed

=AND(F6>=DATE(YEAR(TODAY()),MONTH(TODAY())-15,DAY(TODAY())),F6<=TODAY())

A $ will fix the column
=AND($F6>=DATE(YEAR(TODAY()),MONTH(TODAY())-15,DAY(TODAY())),$F6<=TODAY())

So select say A6 to Z1000
and then all the row will highlight where F meets the criteria

I read within to be the future , hence the confusion
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,812
Members
449,095
Latest member
m_smith_solihull

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