• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Conditional formatting to highlight dates after specific date|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Conditional formatting to highlight dates after specific date|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Conditional formatting to highlight…
sp_PrintTopic sp_TopicIcon
Conditional formatting to highlight dates after specific date
Avatar
Alan Ramsay
Member
Members
Level 0
Forum Posts: 79
Member Since:
April 23, 2015
sp_UserOfflineSmall Offline
1
September 24, 2020 - 9:10 am
sp_Permalink sp_Print

Hi there, hope everyone is safe and well.

I am here with my dunce hat on again!  I am trying to figure out what I imagine will be a simple formula to be used in conditional formatting but I can't get it.

I have a cell with the date a person took a training course. I want to have a formula that will change the cell fill and font when "today's" date is between 1065 and 1095 from the cell value, i.e. the date they took the training course.  I need a second formula to do the same thing but when "today's" date is between 1035 and 1095 from the cell value.

Can anyone help me?

Thanks,

Alan

sp_AnswersTopicSeeAnswer See Answer
Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
September 24, 2020 - 9:58 am
sp_Permalink sp_Print

Hi Alan,

Please., always supply a workbook so we don't have to recreate (incorrectly) your data, and so we can see what you are actually working with.

I don't know what you mean by 'between 1065 and 1095 from the cell value'.  Are these dates?

Phil

Avatar
Alan Ramsay
Member
Members
Level 0
Forum Posts: 79
Member Since:
April 23, 2015
sp_UserOfflineSmall Offline
3
September 25, 2020 - 12:06 am
sp_Permalink sp_Print

Hi Phil,

Thanks for the note and apologies for the confusing message.  The values I listed are days, so the cell value will be the date they took the training course, I want the cell format to change when todays date is between 1065 and 1095 days after they took the training course.  A basic way of flagging when a course is close to its renewal date.

I hope that is clearer, I have added workbook that has my attempts to do this shown in row 3, cells D3 to AI3.

Many thanks,

Alan

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 871
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
4
September 25, 2020 - 5:39 am
sp_Permalink sp_Print

Hello Alan,

You can use the DAYS function to get the number of days between start and end date, wrap that in an IF together with an AND statement to check if the number of days are between the two intervals. Example as of below.

L1 = The end date to check against.
G3 = The start date to check against.

Formula to use as the Conditional Format formula for G3 (I assume it is the date field you want to highlight).
=IF(AND(DAYS($L$1,G3)>=1065,DAYS($L$1,G3)<=1095),TRUE,FALSE)

If you intend to have the second conditional check on same cells then you need to specify the order of these two rules, the top rule is the active one when both are true.

Br,
Anders

Avatar
Alan Ramsay
Member
Members
Level 0
Forum Posts: 79
Member Since:
April 23, 2015
sp_UserOfflineSmall Offline
5
September 26, 2020 - 7:42 am
sp_Permalink sp_Print

Hi Anders,

Many thanks for the help with this one.  I did try to use the formula you provided but I could not get it to generate the desired result.  I think I must be missing something in the logic of the problem.  I have attached another copy of the file to try to highlight what I feel I can't quite grasp.

I have added your formula in the conditional format dialog and applied to cell L3 only.   I am going to write out what I am trying to achieve again here in the hope that it might highlight to you where I am going wrong:rn

The date in cell L3 is 14th Aug 2017, this is the date of a training course.

The training course is due for renewal 3 years after 14th Aug 2017, so basically 20th Aug 2020, or 1095 days after the 14th Aug 2017.

I need a conditional format formula that will change the fill of the cell when "todays" date is 1065 days since 14th Aug 2017, i.e. 30 days before the actual renewal date.

I hope that makes sense - any and all advice welcome!

Alan

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 871
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
6
September 26, 2020 - 5:07 pm
sp_Permalink sp_Print sp_EditHistory

Hello Alan,

One thing we don't have here is how to highlight the cell when we are past those 1095 days, i.e. the renewal period has ended. In attached file I have adjusted the CF formula for L3, it now checks against the date in L3 and not in G3. I have also added two more rules for that cell, giving each a different background colour, so the formula can be simplified as we now no longer need to check if today's date is in between.

Rule 1: =DAYS($L$1,L3)>=1095 <-- Red background colour
Rule 2: =DAYS($L$1,L3)>=1065 <-- Yellow background colour
Rule 3: =DAYS($L$1,L3)>=1035 <-- Green background colour

So just play around and give different date in L1 as today's date.

I hope this helps you to get closer to what you want to achieve.

Br,
Anders

sp_AnswersTopicAnswer
Answers Post
Avatar
Alan Ramsay
Member
Members
Level 0
Forum Posts: 79
Member Since:
April 23, 2015
sp_UserOfflineSmall Offline
7
September 26, 2020 - 11:38 pm
sp_Permalink sp_Print

Hi Anders,

Thanks so much for this, it works!  I am happy to leave the cells when we are past those 1095 days without shading.   The idea is we catch and initiate the training required as we near the renewal dates so we shouldn't have anyone with a training requirement outstanding beyond the 1095 days.

Thanks again, 
Alan

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: AndyC
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Raj Mattoo
Mark Luke
terimeri dooriyan
Jack Aston
AndyC
Denise Lloyd
michael serna
mashal sana
Tiffany Kang
Leah Gillmore
Forum Stats:
Groups: 3
Forums: 24
Topics: 6219
Posts: 27276

 

Member Stats:
Guest Posters: 49
Members: 31903
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.