Conditional Formatting in Months, 6 months from expiry date

sher13CA

New Member
Joined
Jul 20, 2022
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
I have a list of expiry dates (Y M D) and would like to highlight the date if it is within 6 months of expiring. I have some dates in 2022, and some in 2023 and 2024, but I only want to highlight by Month not by the exact Day.
I have searched high a low for something like this. Any help you can provide would be greatly appreciated.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
You can try using formula is

Excel Formula:
=DATEDIF(TODAY(),A2,"m")<=6

If you need to perform a separate check for expired products (which would result in #NUM error) then you can wrap the formula in ISERROR
 
Upvote 0
You can try using formula is

Excel Formula:
=DATEDIF(TODAY(),A2,"m")<=6

If you need to perform a separate check for expired products (which would result in #NUM error) then you can wrap the formula in ISERROR
Thank you, I can work with this, greatly appreciated
 
Upvote 0
Glad we could help and thanks for the feedback.
Remember to mark the solution when you're ready. Cheers, Dave
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,578
Members
449,174
Latest member
chandan4057

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