+ Reply to Thread
Results 1 to 9 of 9

Turn Start/End Dates into individual days

  1. #1
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Turn Start/End Dates into individual days

    I have data that has a start date, end date and total hours
    I need to get it split out by individual day
    The hours would be divided by the number of days and each day would get that amount of hours

    Employee StartDate EndDate Hours
    Test1 1/31/11 2/4/11 55
    Test 2 2/9/11 2/11/11 16
    Test1 2/28/11 3/4/11 40

    I'm trying to do this because ultimately I need to get the total hours for a month, but ranges can span different months.

    Any suggestions appreciated.
    Thanks

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Turn Start/End Dates into individual days

    Do you mean =hours/(enddate-startdate+1) ?

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Turn Start/End Dates into individual days

    The idea is a good one but will all Tests span similar date ranges ?

    In terms of calculating monthly hours etc without the daily values - if we assume source values are A1:D4 (row 1 headers):

    Please Login or Register  to view this content.
    above would return:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Re: Turn Start/End Dates into individual days

    Hi, DonkeyOte
    "Test1", "Test2" would actually be employee last names (which I would probably group on in maybe a pivot table).
    Ranges will be weekdays and could be anywhere from 1 day (start/end are same) to 5 days. Currently, no weekends, but I guess that is a possibility.
    I will test this as soon as I get to work (I woke up with this bugging me)

  5. #5
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Re: Turn Start/End Dates into individual days

    I think I'm lost - I've attached a spreadsheet. I think my data doesn't look like what you wrote the formulas for.
    Attached Files Attached Files

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Turn Start/End Dates into individual days

    The formulae I posted should work ok you just need to revise the ranges used to meet your own requirements, eg:

    Please Login or Register  to view this content.
    Note the array entry for G2

    The above would generate:

    Please Login or Register  to view this content.
    With arrays (& SUMPRODUCT) the precedent ranges should be kept as lean as possible.

    100 rows or as as used here won't hurt but if using with much larger data sets it would be worth considering use of Dynamic Named Ranges (using non-volatile construct - eg INDEX & MATCH).

  7. #7
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Re: Turn Start/End Dates into individual days

    Hi, DonkeyOte,

    I appreciate your help, but it is still not working - see attached sheet
    Attached Files Attached Files

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Turn Start/End Dates into individual days

    It would I think help if we stuck to a consistent sample layout and applied the formulae to the cells suggested.

    Attached is the sample from your penultimate post with the formulae copied & pasted from my subsequent post (arrays confirmed obviously)
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    06-16-2010
    Location
    Tampa, FL
    MS-Off Ver
    Excel 2010
    Posts
    278

    Re: Turn Start/End Dates into individual days

    Thank you. I started in the wrong column - sorry, I get that now.
    Thank you very much for your assistance!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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