+ Reply to Thread
Results 1 to 5 of 5

Calculate hours per month based on Start and End Date

  1. #1
    Registered User
    Join Date
    11-20-2019
    Location
    Brisbane, Australia
    MS-Off Ver
    365
    Posts
    1

    Calculate hours per month based on Start and End Date

    Hello

    I have a simple set of data with Start Dates and End Dates and hours. Assuming the hours are equally spread between the working days between the start and end dates, I am looking for a formula that calculates the number of hours in each calendar month. I was thinking of making a column to the table for each month I am interested in that calculates the total of the hours per line per month.


    StartDate EndDate Hours
    30/07/2020 31/08/2020 13.8
    30/07/2020 5/01/2021 136.8
    18/08/2020 24/08/2020 72.0
    25/08/2020 31/08/2020 48.0
    1/09/2020 15/10/2020 326.7
    16/10/2020 16/11/2020 26.4
    16/10/2020 13/12/2020 147.6
    16/10/2020 5/01/2021 278.4
    16/11/2020 29/11/2020 60.0
    14/12/2020 5/01/2021 10.2

    So the results for the above data set would be:
    July 2020 - 3.6 hours
    August 2020 - 157.80 hours
    Septeber 2020 - 244.20 hours
    Ooctober 2020 - 240.90 hours
    November 2020 - 274.80 hours
    December 2020 - 178.80 hours
    Jan 2021 - 19.80 hours
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Calculate hours per month based on Start and End Date

    Could you tell us how to calculate for one month,i.e, Jul 2020?

    I came up with:
    Task 1: total day: 31/08-30/7+1= 33 days ; hour each day = 13.8/33=0.42 = > day of Jul ( 2 ) * 0.42 = 0.84
    Task 2: total day: 5/01/2021-30/7+1= 160 days ; hour each day = 136.8/160=0.86 = > day of Jul ( 2 ) * 0.86 = 1.71
    Total Jul: 2.55 hours
    You expect: 3.6 hours

    Show me where I were wrong.
    Quang PT

  3. #3
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: Calculate hours per month based on Start and End Date

    I assume by hours are equally spread that you mean you divide hours in D2:D11 by the workdays between dates in B2:B11 and C2:C11. If so, with July 2020 in cell L1, try

    M1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Expand with

    L2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Fill M1 down into M2, then select L2:M2 and fill down as far as needed.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Calculate hours per month based on Start and End Date

    Post deleted
    Last edited by kvsrinivasamurthy; 11-23-2020 at 06:56 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Calculate hours per month based on Start and End Date

    In F2 then copied across

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 11-23-2020 at 07:14 AM.

+ 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: 7
    Last Post: 03-06-2020, 08:35 AM
  2. Calculate start date from finish date minus 14 working hours
    By PietBom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2014, 07:23 PM
  3. [SOLVED] Return number of hours per month based on start and end dates
    By sparky1231 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-29-2014, 12:33 PM
  4. Calculate the 6th month from start date
    By isaching in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-25-2013, 10:54 PM
  5. Calculate START date based on duration (work hours) and END date
    By kaaver in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-06-2010, 12:21 PM
  6. Calculate start date based on working hours and end date
    By kaaver in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-28-2010, 06:58 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