+ Reply to Thread
Results 1 to 5 of 5

Formula to Calculate Leave as per Custom Start and End Date of the Month

  1. #1
    Registered User
    Join Date
    06-21-2016
    Location
    India
    MS-Off Ver
    2013
    Posts
    61

    Formula to Calculate Leave as per Custom Start and End Date of the Month

    Hello All,

    I am using Excel 2013 and I am issue with a Formula to calculate Leave as per the
    Start and End Date of the Month.

    Start Date is 21st of the Month

    End Date is 20th of the Month

    If the Employee is going on leave eg Start Date is 8th July and returns back on 22nd July
    (See Row No 4 in the sample attached) Networkdays.Intl gives the results as 11 but I would like to have it as 9 which should not include 21st and 22nd as it is falling after the end date which is 20th of the Month.

    I have highlighted cells in Column G what is the expected results.

    Any help would be greatly appreciated.
    Attached Files Attached Files
    Last edited by pnasir; 10-26-2022 at 01:34 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Formula to Calculate Leave as per Custom Start and End Date of the Month

    Try this:

    =NETWORKDAYS.INTL(B2,IF(DAY(B2)>=20,C2,MIN(C2,DATE(YEAR(C2),MONTH(C2),20))),1)
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-21-2016
    Location
    India
    MS-Off Ver
    2013
    Posts
    61

    Re: Formula to Calculate Leave as per Custom Start and End Date of the Month

    Hello AliGW,
    Thanks for the formula and your time. Works great.
    Solved my current problem.
    If there are any further requirements I will come back again.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,417

    Re: Formula to Calculate Leave as per Custom Start and End Date of the Month

    If there are further requirements, please start a new thread with a suitable title.

  5. #5
    Registered User
    Join Date
    10-27-2022
    Location
    Australia
    MS-Off Ver
    16
    Posts
    3

    Re: Formula to Calculate Leave as per Custom Start and End Date of the Month

    Nice. Thank you so much for sharing this knowledge.

+ 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. [SOLVED] Calculate how many days people have from Start date until End date from month to month
    By Mariaoskars in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 02-28-2022, 09:36 AM
  2. Calculate hours per month based on Start and End Date
    By Dave1780 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-23-2020, 07:09 AM
  3. [SOLVED] INPUT month and OUTPUT > Weeks in the month, Start date of Wk & Start date of Wk
    By RavindraK in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-06-2018, 10:56 PM
  4. [SOLVED] Need formula to calculate days in each month across multiple Start and End dates
    By Ochimus in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-25-2017, 04:19 PM
  5. Replies: 0
    Last Post: 09-01-2015, 05:33 AM
  6. Calculate Start & End Date & Month for Each Week In Fiscal Year
    By sarndt01 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-22-2014, 02:14 PM
  7. Calculate the 6th month from start date
    By isaching in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-25-2013, 10:54 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