+ Reply to Thread
Results 1 to 8 of 8

Data by month

  1. #1
    Registered User
    Join Date
    11-05-2010
    Location
    CA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Data by month

    Hi I need some help,

    I'm managing hours for students over a span of several months. On the first sheet, I have three columns for dates and start times and end times. The amount of dates I get every month varies. On the second sheet, I have columns to show the total hours per month.

    I attach an example of what I'm trying to do. Sheet1 contains all the dates and times. Sheet2 is the totals. Sheet3 is what I'm trying to achieve. I want all the totals starting in row 1. I have no idea how to go about this though.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Data by month

    Seems like you're trying to summarize your data, if so, try the approach shown in the example attached.
    Attached Files Attached Files
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

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

    Re: Data by month

    My suggestion would be to use a purpose built Pivot Table for this:

    "Date" as Column Label and Group by Month etc
    Calculated Field ["Duration" which is 'End Time' - 'Start Time'] as Data Field
    (set to SUM format as [h]:mm)
    Attached is (XL2007) working example of the above - you can modify the layout of course.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Data by month

    If you just wanted the total of hours, add column D as a helper to your first sheet :-

    =Month(a1)

    then you can total for each month with :-

    =SUMIF(Sheet1!$D$2:$D$13,9,Sheet1!$C$2:$C$13)-SUMIF(Sheet1!$D$2:$D$13,9,Sheet1!$B$2:$B$13)

    Pivot table is the best way to go!!!!!!
    __________________
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


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

    Re: Data by month

    squiggler - if we're championing helpers it would make most sense to store both month and difference so as to negate the need for two SUMIFs, no ?

  6. #6
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Data by month

    I dont think I was championing helpers, Pivot table is as I said the best option!

    But yes you are correct!

  7. #7
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Data by month

    Although, given the inherent smallness of the data,Personally I would have employed a sumproduct for simplicity, given a large dataset pivot table wins out without doubt!

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

    Re: Data by month

    I wasn't debating the merits of the various approaches... simply making the point that if anyone opts for helpers then they may as well use them to their max. advantage [in terms of simplifying final calculation(s)]

+ 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