Due dates in excel





  • Excel Howtos, Learn Excel

Highlight due dates in Excel – Show items due, overdue and completed in different colors


  • Last updated on May 18, 2020

Chandoo

Chandoo

Congratulations to you if your job does not involve dead lines. For the rest of us, deadlines are the sole motivation for working (barring free internet & the coffee machine in 2nd floor, of course). So today, lets talk about a very familiar problem.

How to highlight overdue items in Excel?

The item can be an invoice, a to do activity, a project or anything. Here is an example of overdue, upcoming activities highlighted.

Highlight overdue items in Excel - Show items due, overdue and completed in different colors

highlight-overdue-items-in-excel

The problem – Highlight due dates in Excel

Lets say you work at Awesome inc. and you have list of to-do items as shown below.

sample data for highlighting overdue items

sample-data-overdue-items

And your problem is,

  • Highlight items & due dates, subject to these conditions

    Criteria for highlighting - highlight if due

  • And of course start working on the items that are due

The Solution – Conditional Formatting

As you can guess, highlighting the due items is easier than actually doing them. First lets look at the solution and then learn why it works.

Lets assume that,

  • The data is in the range – B6:D15, with Items (column B), Due date (C) and Completed?(D)

sample-data-overdue-items

How to apply conditional formatting rules

We need to apply 3 rules. Follow below steps:

Highlight overdue items:

Conditional formatting rule for highlighting overdue items

conditional-formatting-rule-for-overdue-items
  1. Select the entire range (B6:D15) and from home ribbon select conditional formatting
  2. Click on New rule
  3. Select the rule type as “use a formula…”
  4. Write =AND($C6<=TODAY(),$D6<>”Yes”)
  5. And set fill color to red & font color to white.

Highlight upcoming items:

Rule for upcoming activities or items in green color

conditional-formatting-rule-for-upcoming-tasks
  1. Add one more “use a formula…” rule
  2. Write =AND(MEDIAN(TODAY()+1,$C6,TODAY()+7)=$C6,$D6<>”Yes”)
  3. And set fill color to green.

Completed items rule:

Highlighting completed items in a different color - highlight if due

  1. Add another “use a formula…” rule
  2. Now write =$D6=”Yes”
  3. And set font color to dull gray from formatting button.

Now, the items will be highlighted based on the current date (TODAY) and change colors as you make progress.

Why does it work? – Explanation

At this point you may have 2 burning questions.

  1. Why does this work?
  2. How the heck am I supposed to ship 100 units of smile.

Lets talk about the solution & understand why it works.

Understanding the highlighting conditions

We have 3 conditions in our highlight table (shown above).

  • If done show in dull gray color
  • Not done & due in next 7 days show in orange color fill.
  • If not done & already due show in red fill, white color

Rule for completed items:

The first condition is easy to check. We just see if a todo item is completed and then highlight the whole row dull gray color. So we write =$D6=”Yes” as the condition. We use $D6 (not D6) because we want Excel to look at column D (completed?) even when we are highlighting other columns (B – Item, C – Due date).

If not done & due in next week:

This is tricky. We need to check,

If completed is not yes

AND

If due date is with in next week

So we start with an AND formula. We write =AND($D6<>”Yes”

Then to check if due date is in next week, we use MEDIAN formula, like this MEDIAN(TODAY()+1,$C6,TODAY()+7)

So the condition becomes =AND(MEDIAN(TODAY()+1,$C6,TODAY()+7)=$C6,$D6<>”Yes”)

conditional-formatting-rule-for-upcoming-tasks

If already due:

This is another simple AND formula =AND($C6<=TODAY(),$D6<>”Yes”)

conditional-formatting-rule-for-overdue-items

Remember:

We need to use $D6 & $C6 (instead of D6, C6) because we want Excel to check Completed & Due date columns. By removing the $ Excel will check relative columns and the conditions would not work!

More: Using relative vs. absolute references in Excel formulas

Now that we understand how this works, give me a big smile. And repeat that 99 more times & you know how to ship 100 smiles 🙂

If you are still confused about the conditional formatting rules for highlighting overdue items, check out this video. Watch it below or see it on my YouTube channel.

Download Example File

Click here to download example file. Break it apart, play with it to understand the whole highlight if due thing.

Note: I use random formulas to generate due dates & completed values. Press F9 to get fresh set of dates. Start typing your own values to remove formulas.

How do you handle dead-lines?

Do you use conditional formatting to see which items are due? I use conditional formatting for this all the time. What techniques you use? Is your dead-line criteria very different than shown above? Please share your tips & ideas with us using comments. I would love to learn from you.

Using Conditional Formatting & Dates – More Examples

Here are a few useful articles if you use Excel to track to do items & reminders.

  • Conditional formatting & Dates – an introduction – Must read
  • Working with date & time values in Excel – a complete overview
  • Another ovredue items example – activities by employee
  • Christmas shopping list in Excel: conditional formatting to track budgets, bought items etc.
  • Employee shift calendar in Excel: Using dates, shift data to show busy & dull times.
  • Annual goals tracker: Track goals by % completed


Share this tip with your colleagues

Excel and Power BI tips - Chandoo.org Newsletter

Get FREE Excel + Power BI Tips

Simple, fun and useful emails, once per week.

Learn & be awesome.




  • 54 Comments




  • Ask a question or say something…




  • Tagged under

    and(), conditional formatting dates, date and time, downloads, Excel 101, Excel Howtos, Learn Excel, median() formula, Microsoft Excel Conditional Formatting, Microsoft Excel Formulas, today(), videos




  • Category:

    Excel Howtos, Learn Excel

Welcome to Chandoo.org

Thank you so much for visiting. My aim is to make you awesome in Excel & Power BI. I do this by sharing videos, tips, examples and downloads on this website. There are more than 1,000 pages with all things Excel, Power BI, Dashboards & VBA here. Go ahead and spend few minutes to be AWESOME.

Read my story • FREE Excel tips book

Advanced Excel & Dashboards training - Excel School is here

Excel School made me great at work.

5/5

Excel formula list - 100+ examples and howto guide for you

From simple to complex, there is a formula for every occasion. Check out the list now.

Calendars, invoices, trackers and much more. All free, fun and fantastic.

Advanced Pivot Table tricks

Power Query, Data model, DAX, Filters, Slicers, Conditional formats and beautiful charts. It’s all here.

Still on fence about Power BI? In this getting started guide, learn what is Power BI, how to get it and how to create your first report from scratch.

A smart technique to simplify lengthy nested IF formulas in Excel

  • Excel for beginners
  • Advanced Excel Skills
  • Excel Dashboards
  • Complete guide to Pivot Tables
  • Top 10 Excel Formulas
  • Excel Shortcuts
  • #Awesome Budget vs. Actual Chart
  • 40+ VBA Examples

Related Tips

54 Responses to “Highlight due dates in Excel – Show items due, overdue and completed in different colors”

  1. Peter says:

    Nice!
    Been using something like this for quite a while. Most companies use deadlines so this would be usefulle for everyone.

    • Gordon Bennett says:

      This is exactly what I need! However, I simply cannot get it to work! I’m using Excel 2010 and am completely replicating what you are doing, but it simply will not do it. Any advice from anyone would be greatly appreciated. PS EnableFormatConditions is set to True

      • S says:

        I had the same issue, but I think it was a formatting issue.

        Copy the formula from this website but delete the «» quotation marks. Type them back in from your own keyboard within the Conditional Formatting dialog boxes.

        Hope this helps.

  2. Love it — although I often turn my books late anyway 🙁

  3. Excel Challenged says:

    I am still not sure how the MEDIAN function works. When I print the value, it prints a random 5 digit number, But, when used in the formula, it does equate to the date which is weird. Why does it behave such ?
    =MEDIAN(TODAY()+1, $C6,TODAY()+7) in a cell returns a 5 digit # while
    =AND(MEDIAN(TODAY()+1,$C6,TODAY()+7)=$C6,$D6<>”Yes”) this seems to work just fine in Conditional formatting.

    • Shalabh Jain says:

      The 5 digit number that you see is the number of days elapsed since 1st Jan 1900 to the date in question. Excel uses this as a basis for all numeric operations on dates.

    • Following what Excel Challenged mentioned above,

      Change the Number format of the cell to DD MMM YY or whatever format you want.

  4. Robert Clark says:

    Very clever use of Median — wouldn’t have thought of using it!

    @Excel Challenged:
    «The MEDIAN function, one of Excel’s statistical functions, shows you the middle number in a data list.
    Middle, in this case, refers to arithmetic value rather than the location of the numbers in a list.
    If there is an even set of numbers, the median is the average of the middle two values. «

    So, if we give three dates (start date, target date, end date), median will return the middle date of the three.  If target date is between the start and end dates, then the median function will return this.  If the target date is before the start date, then the median function will return the start date. If the target date is after the end date, then the median function will return the end date.

  5. Jocelyn says:

    Can you change the dates to only fall on week days?  How?

    • @Jocelyn

      Can you please explain more about what you want to do?

      • Jocelyn says:

        We have an accounts payable spread sheet that has due dates of bills on it.  I would like the dates to only fall on weekdays since we do not work weekends.  Thank you for your help.

  6. Sameer says:

    Ok, lets say if due date is 30 days plus date of invoice; then;

    =IF(AND(WEEKDAY(C13+30,2)>=1,WEEKDAY(C13+30,2)<=5),C13+30,IF(WEEKDAY(C13+30,2)=6,C13+32,C13+31))

    In the above; IF condition will check if weekday of due date is between 1 and 5 ie. 1 being monday and 5 being Friday.
    Then if this is true then it adds 30 days to the date of invoice, else it will add 31 days if due date is falling on sunday or add 32 days from date of invoice if its Saturday…

    Hope i got it right… Chandoo what do u think?

  7. David says:

    How do I have the cell highlight just every 14 days after the date I manually enter in?

    I contact someone on the 1st and I want the cell to highlight on the 14th and that’s it. 

    • Jeremy says:

      To highlight 14 days and after the date you enter.
      =TODAY()<=a1+14
      Or
      To only highlight the 14th day after the date you enter.
      =TODAY()=a1+14

  8. Jennie says:

    brilliant — this is just what I need,
    I wil be adding tasks to the spreadsheet so how can I copy the conditional formatting to other cells in the relevant columns please?

     
    Thank you

  9. djograd says:

    Hi Chandoo! Very nice! Can this be done also in Google Spreadsheet? If not can you please show us a workaround or similar. Thank you. 

  10. LARRY says:

    i have a formula i need to work out. im more of a novice and enjoy working with excel, however some of the more intense formulas escape me. i have followed this thread quite a bit and believe that i can use this to solve my problem, however i cant seem to grasp the specific verbage of the formula i need. i have 2 colums, one for PT test complet, one for PT test due, i have used a simple format of (=column1+180) to get my due date, what i need is to get the due date to highlight color 1-150 days after green, 151to 180 yellow and 181 days after red. help???

    • Hi Larry… Thanks for your comments.

      The simplest way to do this is, add an extra column (lets call it completed).

      Write the formula =today()-column1

      Now, use this column value to color the cells accordingly.

  11. LARRY says:

    im not quite grasping this, can you give me an example?

  12. LARRY says:

    when i do this, it returns the date as 1900

  13. Steve says:

    Good stuff! It worked well for me, however, I now wish to apply the same CF to 2 columns, instead of a cell selction. When I do this, all the blank cells in the columns turn red. Is there a formula for «if blank do not format» or similar?

    • Steve says:

      No problem, I’ve worked it out…modified the last formula to read….
      =AND($D1>0,$D1<=TODAY()+28,$E1<>»YES»)
      The $D1>0 statement means that any blank cells are not formatted.

  14. I’m wanting to figure out how i would do this for my job…i need to have orders signed by doctors and i’m wanting it to let me know when two weeks has passed and the order has not been received.

  15. Yris says:

    Hello,

    I need help…..

    I am trying to make an employee spread sheet that will tell me when training is expired or about to expired or completed. I have an idea but I am still having trouble with the formula, I can do it in one cell but not for an entire column. It is not that big, one column for the employee names, next columns for the dates of the trainings. if training are completed I want them to turn green, if training are 30 days before expiration i want them to turn yellow and if they are expire i want them to turn red. any help please…
    thank you

  16. Andries says:

    Please help if you can!
    I need to make a daily list of jobs with their due dates and then have three different things happening.
    1. When a job is completed/ticked off, it must removed from the list automaticaly
    2. From one day, before the due date, to 12:00am on the due date the cell colour of the whole row must be orange.
    3. After 12:00am on the due date the cell colour of the whole row must be red and stay red untill its ticked off as completed.

    I’ll really appreciate help in this, I’ve tried several formulas but I just don’t get it quite right.

    Regards

  17. Mehaboob says:

    Hi sir
    it is very use full ,I have a doubt after making the due date ex:- in one sheet i have many customer each one have diffrent due due date and I make 12 sheet with month name is it possible to send the due date next sheet by month name , ex ; in JANUARY D1 due date is 12/9/13 I want send this to SEPTEMBER D1,and JAN D2 14/3/13 it need to go to march like this for every month

    I hope you can help me in matter I am really sorry my English is not good
    thanks Mehaboob

  18. I have input all the formulas as the tutorial says but if there is no date put into the field it turns everything red. In other words I am trying to make a template at work with due dates and the orange part works great but everything is red unless I put a date into the cell. Any help would be awesome.

  19. Jeff G says:

    If I want to use condtional formatting to indicate a red if the date entered is after June 20, 2014 and a green if it was completed prior to this date, how would I do this with condtional formatting?

    Thank you

    Jeff

    • Select the cell(s) where you would enter the dates. then,

      1. Go to conditional formatting > new rule
      2. Select the rule type as «Format cells that contain»
      3. Type the condition as below

      4. Set up formatting as needed.
      5. Repeat the rules for other date conditions.
      6. You are done

      • faisal says:

        DEAR SIR,

        PL:Date DUE DATE DAYS OVER Payment Received date

        I WANT THIS IF I ENTERED DATE IN PAYMENT RECEIVED DATE COL THEN DAYS OVER BECOME RECEIVED INSTEAD OF DAYS AND COLOR CHANGED AFTER ENTERED. CAN U GUIDE ME HOW ITS POSSIBLE

  20. Jeff G says:

    Thank you

    So if I wanted it to show red if after the due date I would just set up that condition?

  21. Jessie says:

    I have a column of when a person last took a class and a formula that created the date for when they must take it again, which is in three years. Works great. Now I want to color code the current year. For example: I took a class on 9/25/2012 and am due to retake it on 9/25/2015. I want that cell to turn red indicating that sometime during that year, I have to retake that class. I would even prefer to have the date change to JUST the year (so just «2015» instead of «9/25/2015»). Can you help me do this, please?

  22. Wendy says:

    I really appreciate this post, but I’m confused about the MEDIAN. I assume that’s what selected the whole line of records rather than just what was in the 2 referenced columns. Why is that so?

  23. james says:

    This might appear to be a silly question, but with the date highlighted when it becomes due/past can you get the cell to flash/blink on and off.
    I have just been asked this question i am using the latest excel

    Thank you in advance

  24. Ravi says:

    I want that Once Due date is highlited with Red color , then it should remain highlighted with Red color on next day or untill i change the colour.

    Due date is highlited with color but next day it becomes without highlighting. I want it should remain highlited untill i change.

  25. Juile says:

    Hi there,

    I really need help with this formula. Instead of a YES in the next column indicating that the task is complete, I need to enter a date to track our performance. Once a date is in the Completed Column, the date I am tracking would then turn Grey. I understand the due in 7 days and Past Due Formulas.

    I hope you can help! Thank you!

    • @Juile

      I’d recommend asking the question in the Chandoo.org Forums
      http://forum.chandoo.org/
      attach a sample file to speed up the response

  26. sumeyyah says:

    please i need help, i want to do a conditional formatting: if 15 days left for the due date to color the cell red, if there is 2 months left for the due date to color the cell yellow, if more than 2 months left for the due date i want the color of the cell to be green.

    please i need the formula for that, ive been struggling all day.

    • Brenda says:

      My issue is similar to this. I have one due date for number of tasks and would like to add conditional formatted depending on whether a task is completed or how many days there are until the due date.
      -if no date is entered withing 2 days of the due date — highlight yellow
      -if no date is entered by the due date — highlight red
      -if a date is entered by the the due date — highlight green

      I have tried a number of formulas and conditional formatting scenarios but have had no luck. Thanks in advance.

  27. Dwarkanath bari says:

    i want to generate dates if design actual date is delay for 2 days then for costing department date is increase by delay date.

    design target actual complete costing target marketing target

    05-04-2016 07-04-2016 09-04-2016 10-04-2016

    in above design target date is 05/04/2016 but design task completed on 07-04-2016 so costing target date will be automatically calculated as per delay days.

  28. Russell says:

    =AND(MEDIAN(TODAY()+1,$C6,TODAY()+7)=$C6,$D6”Yes”)

    This is only for 7 days.
    What if I want it to be exactly 2 months away? Or even 1 year away? Any guidance on this? Sorry im very new to excel.

  29. Heidi says:

    I tried to do a variation on this, we are setting up reminders to follow up on emails.

    Column N has date last followed up

    Column O is labeled ‘Application Recieved’ (If I has been received we type YES, if not it is blank)

    First line of data is row 9.

    I am in the process of creating 3 rules to change the cell/words according on where we are up to:

    1. The application form has been received (YES is in ‘O9’), therefore ‘N9’ and ‘O9’ cells turn white and text grey.

    =$O9=»Yes»

    This is working.

    2. If the date in ‘N9’ is less than 7 days old = Yellow cell.

    =AND(TODAY()-$N9>=7,$O9”Yes”)

    Not working. 🙁

    3. If the date in ‘N9’ is more than 7 days old = Orange cell.

    =AND($N9<=TODAY()+7,$O9”Yes”)

    Not working. 🙁

    Love any help you can offer…

  30. Heidi says:

    We are setting up reminders to follow up on emails.

    Column N has date last followed up

    Column O is labled ‘Application Form’ (If I has been received we type YES, if not it is blank)

    First line of data is row 9.

    I am in the process of creating 3 rules to change the cell/words according on where we are up to:

    1. The application form has been received (YES is in ‘O9’), therefore ‘N9’ and ‘O9’ cells turn white and text grey.

    =$O9=»Yes»

    This is working.

    2. If the date in ‘N9’ is less than 7 days old = Yellow cell.

    =AND(TODAY()-$N9>=7,$O9”Yes”)

    Not working. 🙁

    3. If the date in ‘N9’ is more than 7 days old = Orange cell.

    =AND($N9<=TODAY()+7,$O9”Yes”)

    Not working. 🙁

    Love any help you can offer…

    Reply

  31. Ahmad says:

    Hi, I’ve solved this without median and AND functions.

    You’ve used median and AND function in everywhere to avoid «yes». We can avoid «yes» issue by lifting «yes» rule to the top of conditional format rules from manage rules, right? in this case «yes» will be on top of other rules and we don’t need to write «yes» in each next rule.

    ‘m just wondering why you didn’t used like this and preferred median+AND function? is there some moments that I’m missing?

    Please clarify for me 🙂

  32. Bobbie says:

    what is the formula for using a red flag. I would like to apply this concept to a task/project list and would like a red flag to appear in one cell when a task/project is overdue.
    thank you!

  33. James says:

    Hi,

    I am tracking the dates of wage assessments for various positions throughout my organization. We like to preform a market wage assessment every 3 years for every position in our organization. I used the formulas you suggested (minus the column D part with a Yes or No question because not applicable for us. I set up the formulas to show red with positions that are past the 3 year mark and set the other two up to show me ones that are due within 3 months or 6 months. However even ones that are due 3 years from now (newly completed wage assessment), excel is still highlighting these positions red like they are past due. Please advise how I can get the cells of positions that are not past due to stay white/ no fill.

    Thanks,

    James

    • Can you share the condition that you used? It is possible that your condition is returning false positives.

      • James says:

        Sure. I am trying to highlight dates for future and past due wage analysis. These are the conditions I have entered:

        Red: =AND($E$2=TODAY())

        For Red I want to show Assessments that are past due (for us that means no wage assessment has been completed in the past 3 calendar years)
        For Yellow I want to show Assessments that are due within the next 3 months
        For Green I want to show Assessments that are due this year.
        For White/ No Fill I want to show Assessments that are no due at this time ( meaning they have a completed assessment sometime in the past two years.

        I put the date of the last assessment in Column D and then add 1096 days to the date for each position to show when he next assessment is due in column E ( so all of Column E are formula values )

        Please let me know if you have any questions or if I need to provide more detail.

        Thank you,
        James

        • James says:

          Sorry, the rest of my conditions did not show in my reply. I have listed them below:
          Red: =AND($E$2=TODAY())

          • James says:

            Yellow: =AND(MEDIAN(TODAY()+1,$E2,TODAY()+91.3333)=$E2)

          • James says:

            Green: =AND(MEDIAN(TODAY()+91.34,$E2,TODAY()+364.5)=$E2)

          • James says:

            White/ No Fill: =AND($E$2>=TODAY())

  34. James says:

    Yellow: =AND(MEDIAN(TODAY()+1,$E2,TODAY()+91.3333)=$E2)

  35. Brian says:

    Great article.

    How would I go about having cells highlighted by time lapsed for things that are repeated every few months? Say I have a cell that contains a date of March 13th, and I want it to be green for 3 months, then orange for 3 months, then red after 6 months?

Leave a Reply

In this example, the goal is to create a due date based on category, where each category has a different number of days allocated to complete a given task, issue, project, etc. The amount of time available to resolve each category is shown in column H, and categories is the named range G5:H7. The named range is for convenience and readability only. You can also use the absolute reference $G$5:$H$7.

Calculating days

The first task in this problem is to calculate the number of days to use for each category, as shown in the range G5:H7. One way to do it is to start adding IF statements like this:

=IF(C5="A",1,IF(C5="B",3,IF(C5="C",7)))

This approach is called «nested ifs». However, note how this tangles up the formula with the category data. If the days per category changes, the formula will need to be edited. If more categories are added, more IF functions will need to be added. This is not an ideal way to solve the problem.

A better approach is to use the VLOOKUP function to retrieve the number of days for a given category directly from G5:H7, which is named «categories» for convenience only. We can use VLOOKUP like this:

=VLOOKUP("A",categories,2,0) // returns 1
=VLOOKUP("B",categories,2,0) // returns 3
=VLOOKUP("C",categories,2,0) // returns 7

In the above formulas, the lookup_value is temporarily hardcoded as «A», «B», or «C». The table_array is provided as categories, which is the named range G5:H7 and column_index_num is 2, since we want days from the second column in. Finally, we use zero (0) for the range_lookup argument to force an exact match. To use this formula in the worksheet shown, we need to change lookup_value to C5:

=VLOOKUP(C5,categories,2,0)

Now, VLOOKUP will use the category shown in column C to retrieve the correct number of days from G5:H7. If the number of days for a category is changed, or if additional categories are added to the named range categories, the VLOOKUP will continue to return the correct result.

So far, so good. At this point, we have a number we can use for days, but we don’t have a due date.

Creating a due date

The next task is to create the actual due date using the date given in column D. This is a simple problem, because dates in Excel are just serial numbers and can be added together like other numbers. To complete the formula, we only need to start with the date in D5, and add the VLOOKUP formula we created above:

=D5+VLOOKUP(C5,categories,2,0)

This formula gets the date from D5, retrieves the correct number of days for the category in C5 with VLOOKUP, and adds the two values together. The result in E5 is 16-Sep-2021, since we start with 15-Sep-2021 and add 1 day for category «A».

With XLOOKUP

For this problem, VLOOKUP works fine. However, you can also use the XLOOKUP function if you prefer like this:

=D5+XLOOKUP(C5,$G$5:$G$7,$H$5:$H$7)

Here we use absolute references since we can’t use the named range categories directly for lookup_array and return_array. However, we can also get fancy and use the INDEX function with the named range like this:

=D5+XLOOKUP(C5,INDEX(categories,0,1),INDEX(categories,0,2))

Here we use zero for the row_num in INDEX, which causes INDEX to return the entire column.

Note: using an Excel Table instead of a named range for G5:H7 would be a good approach for XLOOKUP or VLOOKUP.

Workdays only

To create a due date based on workdays only you can alter the formula like this:

=WORKDAY(D5,VLOOKUP(C5,categories,2,0))

In this version, the WORKDAY function returns the final due date. The start date is the same and comes from column D. The VLOOKUP function is the same and returns days as before. The difference is that both values are returned directly to the WORKDAY function: D5 becomes the start_date and the result from VLOOKUP becomes the days argument.

WORKDAY uses the start date and days to create a date in the future, automatically ignoring Saturday and Sunday. WORKDAY can also ignore holidays as well, if they are provided as a range with valid dates. See the WORKDAY page for more information. If you need to customize the days treated as weekends, you can replace the WORKDAY function with the WORKDAY.INTL function, which offers more control over non-working days.

With hours

If you are using datetimes (i.e. date + time), you can adjust the categories table to show Excel hours (i.e. 8:00, 12:00, etc.) and use the same formula to determine a due date measured in hours. This works, because hours in Excel are fractional parts of 1 day. You will also need to change the number format used in column E to show date and time.

Image of Susan Harkins

on

February 16, 2021, 11:10 AM PST

How to use conditional formatting to highlight due dates in Excel

The ramifications of missing a due date can range from simply adjusting the date to getting fired. Don’t take chances with deadlines when a simple conditional format can remind you.


We may be compensated by vendors who appear on this page through methods such as affiliate links or sponsored partnerships. This may influence how and where their products appear on our site, but vendors cannot pay to influence the content of our reviews. For more info, visit our Terms of Use page.

Image: iStock/z_wei

Most of us track dates for project management, appointments, and so on. Regardless of how simple or complex the sheet, a due date isn’t worth much if it slips by unnoticed. You can set a reminder in Outlook, but there’s no such feature in Microsoft Excel—that isn’t its purpose. However, it’s easy to grab your attention with a format that alerts you to the due date. In this article, we’ll use conditional formatting to highlight due dates.

SEE: 69 Excel tips every user should master (TechRepublic)

I’m using Microsoft 365 on a Windows 10 64-bit system, but you can use older versions. You can work with your own data or download the demonstration .xlsx file. However, you must change the date examples to the current date (that will make more sense later). The browser edition will support most conditional formats, but you can’t apply a formulaic rule.

How to highlight the due date in Excel when it’s today

“That was due today?” We’ve all had it happen. Missing a deadline is easy enough to do even though we do our best to stay on track. The simplest alert is to highlight all projects that are due today. At least that way, we can contact others to alert them that we’re changing the due date—or make whatever amends are needed.

SEE: How to use Find All to manipulate specific matching values in Excel (TechRepublic)

The sheet shown in Figure A is simple on purpose so we can focus on the conditional format that highlights any date that matches the current date. Cell C1 returns the results of the =TODAY() function. You might not need this, but I’ve added it as a visual clue. Now, let’s set a conditional formatting rule that highlights due dates that match the current date, which in this case is Feb. 13, 2021:

  1. Select the data. In this case, that’s C4:C8.
  2. On the Home tab, click Conditional Formatting in the Styles group.
  3. From the dropdown, choose New Rule.
  4. In the resulting dialog box, choose Format Only Cells That Contain in the upper pane.
  5. In the lower pane, choose Dates Occurring from the first dropdown.
  6. In the second dropdown, choose Today (Figure A).
  7. Click Format, then click the Font tab.
  8. From the Color dropdown, choose Red, and click OK twice.

Figure A

Figure B

As you can see in Figure B, the format changed the font color for the record in row 5 to red. Instantly, you know a project is due today. Now, you might want to highlight the project as well. In that case, you’ll need a formulaic rule. But first, choose Manage Rules from the Conditional Formatting dropdown and delete the first rule. To add this new rule, do the following:

  1. Select B4:D8.
  2. On the Home tab, click Conditional Formatting in the Styles group.
  3. From the dropdown, choose New Rule.
  4. In the resulting dialog box, choose the last option in the upper pane: Use a formula to determine which cells to format.
  5. In the lower pane, enter the following function (Figure C):
    =$C4=TODAY()
  6. Click Format and then click the Font tab.
  7. From the Color dropdown, choose Red, and click OK twice.

Figure C

This time, the rule highlights the entire row, as shown in Figure D. At this point, though, you might be wondering if this record should be highlighted at all because the task is already complete. You’re probably right; most people would not want to be distracted by this record. If this is the case, you need to add a second condition to the rule: If the date equals today and column D doesn’t equal Yes, highlight the record.

Figure D

In Figure E, you can see that I changed the date in row 6 to Feb. 13, so you can see this rule at work. The record in row 5 isn’t highlighted because it’s complete. The record in row 6 is highlighted because the due date is today but it isn’t complete. To implement this rule, delete the second rule and add this one:

=AND($C4=TODAY(),$D4<>”yes”)

Figure E

Stay tuned

It’s easy to highlight a record based on the current date, but when dealing with tasks that you must complete, you might prefer a conditional format that alerts you well before the due date. In a future article, we’ll take on that task.

Also see

  • How to become a software engineer: A cheat sheet (TechRepublic)
  • Zoom vs. Microsoft Teams, Google Meet, Cisco WebEx and Skype: Choosing the right video-conferencing apps for you (free PDF) (TechRepublic)
  • Hiring Kit: Application engineer (TechRepublic Premium)
  • Microsoft 365 (formerly Office 365) for business: Everything you need to know (ZDNet)
  • Must-read coverage: Programming languages and developer career resources (TechRepublic on Flipboard)
  • Microsoft

  • Software

Our Comment Policy.

We welcome your comments and questions about this lesson. We don’t welcome spam. Our readers get a lot of value out of the comments and answers on our lessons and spam hurts that experience. Our spam filter is pretty good at stopping bots from posting spam, and our admins are quick to delete spam that does get through. We know that bots don’t read messages like this, but there are people out there who manually post spam. I repeat — we delete all spam, and if we see repeated posts from a given IP address, we’ll block the IP address. So don’t waste your time, or ours. One other point to note — if you post a link in your comment, it will automatically be deleted.

Add a comment to this lesson

.

Comments on this lesson

Conditional Highlighting

Hi,

I am looking at a spreadsheet showing all emloyees’ vacations in a tracker.
I would like a red highlight to appear (perhaps in the totals column at the far right of the sheet, or on the team itself in the team column), when there is more than 40% of a team away at the SAME time.

Currently the letter «V» indicates vacation, there are rows for each employee and columns showing the dates in chronological order.

Thank you in advance to anyone who can shed some light on this!

Upa

.

Highlight a Cell depending of the value of another cell

Hi,

I have created a reservation list for the max. capacity of tables in a restaurant.

In the one column will be entered the number of guests, the next column calculates the amount of tables needed.

In one cell will appear the number of tables used in total with the note if tables will still be available or if the restaurant is full.

I am looking now for a formular in the conditional formating that highlights automatically the cells in the column for the needed tables if there is going to be an overbooking with the next reservation made.

To make it more understandable:

The formular of the cells for the tables needed is

=IF(D6=0,»»,IF(D6<5,1,IF(D6<7,2,IF(D6<9,3,IF(D6<11,4,IF(D6<13,5,IF(D6<15,6,IF(D6<17,7))))))))
and
=IF(K6=0,»»,IF(K6<5,1,IF(K6<7,2,IF(K6<9,3,IF(K6<11,4,IF(K6<13,5,IF(K6<15,6,IF(K6<17,7))))))))

For both columns the cell counting the total of tables needed
=IF(K31>24,»FULL»,»AVAILABLE»)

Based on the total of tables needed I want the cells in the columns for the reservation of the tables to change the color as soon as the K31 shows FULL.

Thanks for your help

.

Formatting cells with dates

I’m attempting to write a format for our spreadsheet that tracks post-mammogram actions. I need to format the «date of exam» field to remain green for seven days and then turn red until a date is entered into the «date results sent» cell. Thanks in advance!!

.

Highlighting overdue dates

I am creating a spreadsheet with all staff training. Some of the Training is Mandatory and also needs to be renewed every ..12 months for example. Is there a formula that I can input that will change the date to amber if the training is coming up for renewal (e.g 4 weeks before due, and will also incorporate an additional formula that will change the date to red if overdue.

.

Two conditional formatting rules required

Hi Michelle

You’ll need two conditional formatting rules for this, each of which applies its formatting based on a formula.

If your Due Date is in cell D6, then the formulae you need will look something like this:

  1. =(TODAY()-A6)<=28 (use this for the due in less than 28 days rule — it checks if the due date is less than 28 days away)
  2. =TODAY()>A6 (use this for the overdue rule — it checks if the due date is before today).

It doesn’t matter which order these rules appear in when looking at the list of conditional formatting rules.

I hope that helps. Feel free to reply with any further questions.

Regards

David

.

Conditional Formatting for Expiry dates

HI there Dave

Please can you help me with a formula for columns in which I need to apply the following:

date due to expire in 60 days, then another colour if it is due to expire in 30 days, and a thrid colour if it has expired.

I have tried various ways of formatting but I cannot get 3 sets of conditions/rules to work together to change colour as appropriate.

Many thanks

Sheila

.

Conditional Formatting

I’m having a hard time utilizing the conditional formatting function. I am managing several pilots and I have a spreadsheet that shows when they are due certain things based upon their birth month. For example, a pilot has to take an annual exam based upon his birth month.
If he is within 30 days of his birth month or over 365 days, the cell will turn red.
If he is within 60 days but more than 30, it will turn yellow.
If he is within 90 days but less more than 60, it will be green.
All cells will have no color if he has a current date (within 90 days).

.

Multiple conditional rules, each with a separate formula

Hi Chuck

The key here will be to use formulas that calculate to TRUE or FALSE.

The challenge will be that you want to do things based on a comparison of the pilot’s birthday and the current date.

That could be simple — your formula could be something like the following (assume the birthday is entered in C6):

=(C6-TODAY())<=30.

This will be true if the future birthday is 30 days or less from today.

Your challenge, as you’ve described it, is to calculate the difference between today and the first day of the month in which the pilot’s birthday occurs. That’s a bit harder to achieve:

First, here’s a formula to return the first day of the birthday month:

=DATE(YEAR(C6),MONTH(C6),1)

This formula returns the first day of the month for the date shown in C6. This is a date value, so we can use it in a revised version of our conditional formula above:

=(DATE(YEAR(C6),MONTH(C6),1)-TODAY())<=30.

This new formula compares the first day of the month in which the pilot’s birthday occurs with today. If today is within 30 days of the first day of the birthday month, this formula will return TRUE, which would trigger the conditional rule this formula is attached to.

It’s slightly flawed, though, since it assumes the pilot’s next birthday is happening this year, not next (e.g. what if it’s December, and the birthday is in January). This formula partially addresses this scenario:

=(DATE(YEAR(C6)+(MONTH(TODAY())>=MONTH(C6),MONTH(C6),1)-TODAY())<=30.

I suspect even this formula still needs some work, e.g. what happens if TODAY() and the birthday are both in the same month, but the birthday has already happened. Should it go red? It will do with this formula.

I realize that I haven’t given you a complete solution here, but hopefully it will set you on the right path. Feel free to ask more specific questions (with formula examples) here if you are still stuck.

Regards

David

.

Preventative Maintenance Tracker

Hi

I’m working on a spreadsheet to track all our downhole tools for their maintenance due dates.
I have a column where the current maintenance was done and another column for the due date which is 12months/365days from when maintenance was last done.
I’d like to apply a condition in which the dates under the due date column can turn Green if its within 12months and if its past 12months I’d like these cells to turn red.

Cheers
Andrew

.

Help

Hi,

If we would like to make a Condition Formatting formula for the cell to turn Yellow after any of the dates passed 1 week of the Reference Date and to turn Red after the date passed 2nd week (at this point, Yellow should no longer showing. Only Red).

Ex: 12th = Ref, 19th-26th = Yellow and 27th onwards = Red

Please help to advise. Thanks.

.

conditional Formatting help

hello. I am trying to update a number 2.5 every 30 days starting on the 1st of the month. I would also like that number to change colors from green 0-44 to yellow at 45-59 and red at 60+

so if my number starts out at 10 in 30 days starting on the 1st the number updates to 12.5 and then in 30 more days 15 etc. Any help you can provide me would be appreciated. Thank you

.

Please help!

I’m trying to create a heat map of tasks to see what’s overdue. The logic is, is the deeadline in the past? If so is the task complete? If falseenter incomplete, if true, enter complete. The issue is I’m really struggling with future deadline dates. I’ve tried this formula =IF(AND(Gant!G13<>»100%»,Gant!E13<TODAY()),»Overdue»,»Complete») which works great except fails completely with future dates as I’m asking for dates less than today.

Ideally, for future tasks was in the future it would enter the future date, if already complete it would say complete.

Many thanks for your help :)

.

Conditional Formatting

I am trying to format cells red, yellow, or green based on two conditions (1) past their due date and (2) percent complete. If it’s past a due date and not complete it’s red. If a task is due in two weeks and less than 25% it’s red; due in two weeks and between 25 — 75% it’s yellow; due in two weeks and >75% green. How do i do this?

.

Application of 2 argument formula to the rest of the excel

Hi,

So i have used the «AND» formula to apply to the single cell where it checks if the corresponding cell is either «Done» or not and then changes color.

How can i extend the application of the conditional format to do this for all the date cells to check its corresponding status?

eg. =AND($H$3<>»g»,$D$3<TODAY())
Where Column D = due date
Column H = status

Do i have to create a conditional formula for every single cell separately?

.

Application of 2 argument formula to the rest of the excel

Hi,

So i have used the «AND» formula to apply to the single cell where it checks if the corresponding cell is either «Done» or not and then changes color.

How can i extend the application of the conditional format to do this for all the date cells to check its corresponding status?

eg. =AND($H$3<>»g»,$D$3<TODAY())
Where Column D = due date
Column H = status

Do i have to create a conditional formula for every single cell separately?

.

Conditional Formatting — date

Thank you so much. this was quick and awesome to access and get to the answer without struggling to understand where to go. I love the visuals and explanations. Huge thanks

.

How to insert date auto

I need to insert date auto i.e
If i have date column D,and one column i have to insert price of an item so i need when i insert price at that time auto update the date column with current date…any one help me???

.

conditional formatting for a specific date

Hi,

I need to create a spreadsheet with a colour code system that will change colour based on the proximity to the due date entered in a cell. this will be a list of different dates as they are entered.

i would like them to be-

*red if it is between 0-7 days
*amber between 8-24 days
*green between 25-100 days

Is this possible? I’ve tried various different things with no luck :(

I

.

You need to figure out the right formula

Hi Emily

The question is whether you can write a set of formulas to calculate the outcomes you want.

The lesson uses this formula as an example:

=AND(D5<>»Done»,C5<TODAY()

In your case, you might write something like this:

=AND((D5-TODAY())<=7,(D5-TODAY())>=0)

In this example, D5 contains the due date.

  • The formula compares the due date to today’s date.
  • One comparison is to make sure that the due date is no more than 7 days away (<=7)
  • The other comparison is to make sure that the due date is still in the future (>=0)
  • The AND function means that both comparisons must be TRUE.

You would use this formula in a conditional format rule for making the colour red.

You would then create additional conditional format rules similar to this for 8-24 days (amber)and 25-100 days (green).

The key point is to remember that you can’t do all of this in one single rule — you need a separate rule for each colour.

I hope that helps.

David

.

What formula to use if you have multiple statuses?

Thanks for this page, really useful. However, I’m a bit stuck as I need a formula which excludes formatting for when the status is either ‘Completed’ or ‘Not required’. How would this work?

Many thanks,
Sophia

.

SOLVED

For anyone needing to remove the conditional formatting for two statuses rather than just one, this is the formula to use:

=AND(A1<TODAY(),OR(B1<>»Done»),OR(B1<>»Not required»))

Where A1 is the column denoting date/deadline, and B1 is the column denoting task status.

If you have three or more I think you can just keep adding OR(…) or the formula.

.

Conditional Formatting in Excel 2016

Hello,

I’m trying to create a suspense file of anniversary dates to show status in a separate column next to the column with dates to reflect as «Current» (if date is before today’s date), however, to reflect status of «Pending» (if the date is 30 days before today’s date) and future (if the date is after today’s date).

.

Conditional formattion

HI,
I am marking progress of window installation on a project and have included in the spreadsheet some conditional formatting tasks which i’m happy with.
I want to move up to the next stage and include what i had planned and need cells highlighting according to the current date.
I have detailed what i want to do in the spreadsheet.
Thanks in advance for your help.

.

Dates

So I am a case manager and I complete a needs assessment when I begin workign with a client for example 6/22/2020. I need to compelte monthly notes prior to that date and would like to the column that has the Case Management needs assessment date to be highlighed 5 days before that date is on any month and then go away after that date has passed. Does this make sense. Please let me know.

Thanks,

Stacey

.

Conditional formatting

Hello,
I would like to create a conditional format to highlight a row (A:H)
Column A lists all days of the year as ddd-d-mmm-yy and i would like to highlight all rows that contain the 20th of each month.
thank you.

.

excel

I need to create a spreadsheet where i need to measure the KPI of each order placed. For Eg. order date 6th sep then it has to be shipped within 2 days (8th sep). If not then the date appears red.

How do i do that?

.

Conditional formatting using TODAY Function

I want to create a file that refers to the deadline on an action list so that for every action it reflects Overdue, Not due, Due in 7 days.

.

Conditional Formatting of training

Hello,

I have a spreadsheet that I use to track when an employee has completed their training. In the spreadsheet I enter the date it was completed. I would like the spreadsheet to highlight the specific cells when they are coming up on their renewal date. I DO NOT have a due date column. I would like the spreadsheet to take the date in the cell and add 365 days to it to determine the due date itself and then compare it to the current date to then add red highlights to the date that has past (expired), add 335 days to that date to highlight yellow for soon to expire, and all else can stay green. Is this possible?
I have multiple different training sessions so its not conducive to have a «due date» for all of these tests. Hope someone is able to help?

.

Conditional Formatting of training

Hello,

I have a spreadsheet that I use to track when an employee has completed their training. In the spreadsheet I enter the date it was completed. I would like the spreadsheet to highlight the specific cells when they are coming up on their renewal date. I DO NOT have a due date column. I would like the spreadsheet to take the date in the cell and add 365 days to it to determine the due date itself and then compare it to the date to then add red highlights to the date that has past (expired), add 335 days to that date to highlight yellow for soon to expire, and all else can stay green. Is this possible?
I have multiple different training sessions so its not conducive to have a «due date» for all of these tests. Hope someone is able to help?

.

Due Date Calculation

Hello All,

I need help in the following query:
Due Date column to dynamically change to the color’s of an entire row when approaching due date. For e.g. if the task is due 10 days from due date, the row should turn orange; if the task is due 2 days from the due date, the row should turn red) Due Date column (H).

Thanks in advance

.

Due Date Calculation

Hello All,

I need help in the following query:
Due Date column to dynamically change to the color’s of an entire row when approaching due date. For e.g. if the task is due 10 days from due date, the row should turn orange; if the task is due 2 days from the due date, the row should turn red) Due Date column (H).

Thanks in advance

.

Three colour due dates

Hi there.

First of all congrats for the great job you do.

Please can you help me with a formula for columns in which I need to apply the following:

Date due to expire in 30 days, then another colour if it is due to expire in 7 days, and a thrid colour if it has expired.

Thanks a lot

.

Conditional Formatting

Good afternoon.
I have been watching videos and reading different «articles» on conditional formatting. What I am trying to do is set up my RFI (Request for Information) spreadsheet to track when an RFI is past due from the date it was sent, but also show the days it has been «Open».
0-10 days — Green
11-15 days — Yellow
16-20 days — Red
The kicker is I want the cell to go back to white when we enter the date we receive a response.
Any help would be greatly appreciated!

.

.

.

.

Like this post? Please share to your friends:
  • Dtpicker как установить в excel
  • Dtpicker vba excel 2019
  • Dtpicker vba excel 2016
  • Dtd запрещен xml excel
  • Dsum excel на русском