+ Reply to Thread
Results 1 to 11 of 11

Need to calculate when a date is = or less than 30 days prior to today's date

  1. #1
    Registered User
    Join Date
    04-07-2016
    Location
    Houston, Texas
    MS-Off Ver
    Home and Business 2013
    Posts
    3

    Need to calculate when a date is = or less than 30 days prior to today's date

    I manage truck drivers and I need a way to be notified when their license and/or medical cards are within 30 days of expiration. For example, if a drivers license expires May 7, 2016 - I need the cell to turn red today (April 7, 2016). I have the formula =E3-30 to let me know what day is 30 days prior to expiration. But I need that cell to turn red when it's 30 days from any given "today". Hope I explained this okay...Thank you for any help.
    Last edited by tk3god; 04-07-2016 at 11:45 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    Hi,

    Use a conditional format. WIth the expiry date in A1 then set the A1 CF to
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    http://www.excelforum.com/excel-prog...days-date.html

    Co-incidence or what?

  4. #4
    Registered User
    Join Date
    07-10-2014
    Location
    East Sussex, England
    MS-Off Ver
    2007, 2010
    Posts
    51

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    Easy peasy.

    Name a cell such as THE_DAY, and use the named cell range in your conditional formatting formula rather than TODAY().
    Then you can insert the formula =TODAY() in the named cell when you want it to dynamically refer to the today's date, or over-type e.g. "14/4/2016" into THE_DAY cell, when you want the conditional formatting to relate to a date in the past or in the future...

    Does this work? It seems simple, maybe i have missed your point??

    Let me know.
    Robbo

  5. #5
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    Hi -

    Just use the following formula:

    =DAYS(E3,TODAY())

    Then apply conditional formatting (on the Styles section of the Home ribbon) to change the color of the cell when it is less than 30.

    Hope this helps.
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  6. #6
    Registered User
    Join Date
    04-07-2016
    Location
    Houston, Texas
    MS-Off Ver
    Home and Business 2013
    Posts
    3

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    Quote Originally Posted by loginjmor View Post
    Hi -

    Just use the following formula:

    =DAYS(E3,TODAY())

    Then apply conditional formatting (on the Styles section of the Home ribbon) to change the color of the cell when it is less than 30.

    Hope this helps.
    I used this and it worked perfectly. Thank you all very much.

  7. #7
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    You're welcome. Glad we could help. Please don't forget to mark this thread as [SOLVED].

    Thanks

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    Be aware that DAYS() calculates based on a 360-day year, so some results may surprise you. Also, it can return negative numbers, not absolute differences.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    Hi SHG -

    Are you sure? I don't see that in the documentation for the DAYS() function and I do see a separate function called DAYS360() based on 12 30 day months. Can you please verify that?

    Thanks,

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    You're absolutely right -- I use Excel 2010, and DAYS it doesn't exist. Sorry.

  11. #11
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Need to calculate when a date is = or less than 30 days prior to today's date

    No problem SHG! Thanks for checking!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Calculate number of days between invoice date and today's date
    By JHerrick in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-30-2020, 03:53 PM
  2. [SOLVED] calculate number of days between a date and today
    By South texas man in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-20-2020, 04:58 PM
  3. [SOLVED] I need a formula to always calculate exactly 21 days from today's date.
    By phxfitness in forum Excel General
    Replies: 7
    Last Post: 06-26-2015, 07:00 PM
  4. [SOLVED] Calculate 365/180/90/30 days from today date
    By DonW in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2013, 09:44 AM
  5. Replies: 4
    Last Post: 01-17-2013, 01:23 PM
  6. create a macro to alert me if today's date is within 5 days of expected delivery date
    By ashmcclure in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 09-25-2008, 05:51 PM
  7. how to calculate a date .. say 34 days from today
    By shaunl in forum Excel General
    Replies: 5
    Last Post: 07-13-2005, 09:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1