+ Reply to Thread
Results 1 to 5 of 5

How to calculate the days and months between two dates separate

  1. #1
    Registered User
    Join Date
    06-21-2019
    Location
    Belgium
    MS-Off Ver
    Microsoft Office 2016
    Posts
    4

    How to calculate the days and months between two dates separate

    Hello , i want to calculate how many days are between to dates without Public Holidays and second from a contract who start at one date and finish to another, how many days is from January to April e.t.c. I attach a file , i want a formula to calculate the yellow cells. Thank you very much
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: How to calculate the days and months between two dates separate

    I dont really wanna get too involved in this as its late Friday afternoon and I'm leaving for the weekend shortly but here's a start

    Days between dates

    =DATEDIF("1/1/2019","30/4/2019","d")+1

    Days between dates excluding Public Holidays

    =(DATEDIF("1/1/2019","30/4/2019","d")+1)-SUMPRODUCT((N6:N15>=A16)*(N6:N15<=B16))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    485

    Re: How to calculate the days and months between two dates separate

    For the yellow cells in range A8:G8, try

    =NETWORKDAYS.INTL($J$5,$J$6,REPLACE("1111111",FIND(LEFT(A$5,2),"zMoTuWeThFrSaSu")/2,1,0),$N$6:$N$15)

    For the yellow cells in range H11:H14, try

    =MIN("2019-4-30",$J$6)-MAX("2019-1-1",$J$5)+1

    Change the dates in red as needed.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to calculate the days and months between two dates separate

    Edited Fixed detail in formula.

    For the days in H11:H14 break the Start-End dates out in I11:J14. With the Contract Start - End Date in I10:J10 this in H11 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by FlameRetired; 06-23-2019 at 04:45 PM.
    Dave

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How to calculate the days and months between two dates separate

    A shorter formula for H11:H14
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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. Replies: 5
    Last Post: 10-21-2017, 10:26 AM
  2. Replies: 8
    Last Post: 02-20-2014, 05:46 PM
  3. Replies: 1
    Last Post: 08-29-2013, 03:17 PM
  4. Replies: 11
    Last Post: 01-13-2013, 09:40 AM
  5. [SOLVED] Calculate number of days when months change
    By wherzdaluv in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2012, 12:06 PM
  6. Replies: 4
    Last Post: 11-28-2011, 06:21 AM
  7. Replies: 1
    Last Post: 06-29-2006, 09:30 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