+ Reply to Thread
Results 1 to 9 of 9

Excel formula to count number of days between sets of dates?

  1. #1
    Registered User
    Join Date
    05-04-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2014
    Posts
    19

    Excel formula to count number of days between sets of dates?

    Hi all

    I am building a staff training spreadsheet in Excel,
    and would appreciate any help with finding a solution
    to a date function query.

    See attached spreadsheet for the exact layout that I have built with previous help
    from the forums.

    (On this spreadsheet, With help from the forums, I learned how to do COnditional Formatting,
    the DATEIF function and check out the summary I designed in the tab "Monthly Summary".

    Please feel free to use these bits yourself for anything you're working on. )


    Now I need to add in two more bits.

    The first is the the interval between training, this is just a number of days,
    and is not a problem.

    The second is the bit I need help with, I need to have a column called "DUE DATE"
    and the due date of the training. The spreadsheet needs to add up the interval days
    to the most recent date from DATE1, DATE2 or DATE3 and display the result, like this:

    Does anyone know how to do this?

    Thanks
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-01-2016
    Location
    London, England
    MS-Off Ver
    2016
    Posts
    14

    Re: Excel formula to count number of days between sets of dates?

    Do you mean MAX(D6:H6)+J6 in column K (Due Date) to add the training interval to the most recent (maximum) training date?

  3. #3
    Registered User
    Join Date
    05-04-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2014
    Posts
    19

    Re: Excel formula to count number of days between sets of dates?

    Hi all

    Thanks for the help with the spreadsheet query.

    The formula =MAX(D2:H2)+J2 works nicely, but I have one
    small issue, see attached file "Training II".

    IF there is no data for the formula to calculate, as in Harley Quinn's
    case, it returns a date like 01/01/1900.

    Is there any way to solve this?

    Could the MAX formula be altered to display a value like "OVERDUE" based on the
    fact that there is no data to compute?

    Thanks,

    Barney
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,841

    Re: Excel formula to count number of days between sets of dates?

    Try

    =IF(MAX(D2:H2)=0,"OVERDUE ",MAX(D2:H2)+J2)

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,777

    Re: Excel formula to count number of days between sets of dates?

    Take the word NONE out of D3, then use this in K2 copied down:

    =IF(COUNTA(D2:H2)>0,MAX(D2:H2)+J2,"OVERDUE")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    05-04-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2014
    Posts
    19

    Re: Excel formula to count number of days between sets of dates?

    Hi all
    Just to finish up this thread, I went with the DATEDIF solution, and it has worked flawlessly since before Christmas.

    Here is the formula I used for a someone who has to do mandatory training every twelve months.

    Anyone who has done the training in the last 11 months gets an "OK"

    Anyone who has done the training in the last 11 months, but will be due to do the training within the next month
    gets a "DUE"

    Anyone who has never done the training, or has done it more than twelve months ago gets a "TO BE DONE"

    =IF(DATEDIF(MAX(K101:O101),TODAY(),"m")<11,"OK",IF(DATEDIF(MAX(K101:O101),TODAY(),"m")=11,"DUE","TO BE DONE"))

    Thanks again for the help.

    Barney

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,841

    Re: Excel formula to count number of days between sets of dates?

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,733

    Re: Excel formula to count number of days between sets of dates?

    barneysplash,

    As an aside I notice your profile says Excel 2003 yet you've uploaded an *.xlsx file.

    Please take the time to update your profile as contributors often tailor their solutions with that in mind.

    Thanks.
    Dave

  9. #9
    Registered User
    Join Date
    05-04-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2014
    Posts
    19

    Re: Excel formula to count number of days between sets of dates?

    Hi all

    Marked as SOLVED and updated my profile to Excel 2007.

    Thanks again, great site!

+ 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. Need formula to count the number days between dates
    By Barieq in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-04-2016, 05:16 PM
  2. [SOLVED] Count number of days between two dates, if the day is between 1-5
    By Randi20 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-13-2013, 01:37 AM
  3. [SOLVED] Vlookup dates between two dates and count the number of days
    By nishikanth in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-28-2013, 03:25 AM
  4. Help on count the number of days in between dates and then average number of days
    By Barbara Excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2013, 12:13 PM
  5. Number of days between 2 sets of dates (Word table)
    By jayll in forum Word Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2011, 09:33 AM
  6. Calculate Number of Days Using 2 sets of Dates
    By essential in forum Excel General
    Replies: 10
    Last Post: 06-05-2009, 02:55 PM
  7. [SOLVED] FORMULA NEEDED TO COUNT DAYS IN EXCEL BETWEEN DATES
    By Rhonda1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2006, 08:20 PM

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