+ Reply to Thread
Results 1 to 2 of 2

Pivot--data has start and end date range, but need hours broken out by months

  1. #1
    Registered User
    Join Date
    10-12-2009
    Location
    AZ
    MS-Off Ver
    Excel 2003
    Posts
    1

    Pivot--data has start and end date range, but need hours broken out by months

    I'm using Excel 2007

    My data has a start and end date, project name and the hours per month.
    I need to create a chart, by month, on the total number of hours for each project per month.

    The first example shows the data.
    The 2nd example shows how the data needs to be organized so a chart can be created
    that shows the hours, per month, for each project.

    I've tried 'grouping' the data in a pivot table, but can't get it to work.

    Any suggestions?

    EXAMPLE OF DATA
    start date........end date..............project........hrs per month
    10/1/2012........11/30/2012........Project-AA........5
    11/1/2012........11/30/2012........Project-BB........1
    10/1/2012........1/31/2013.........Project-CC........15

    EXAMPLE OF HOW THE DATA NEEDS TO BE ORGANIZED FOR THE CHART
    .....................Oct.....Nov.....Dec.....Jan
    Project-AA........5........5
    Project-BB..................1
    Project-CC.......15......15........15.....15
    Last edited by Laavista; 10-10-2012 at 05:49 PM. Reason: solved

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Pivot--data has start and end date range, but need hours broken out by months

    With your original data in A3:D5 (see attachment), first I changed from Text months to numerical values formatted as "mmm"
    So in B8, I entered 10/1/2012 and formatted the cell > custom "mmm"
    Then in C8 dragged to the right
    =EOMONTH(B8,0)+1

    Then in B9 dragged across and down
    =IF(AND(B$8<=INDEX($B$3:$B$5,MATCH($A9,$C$3:$C$5,0)), B$8>= INDEX($A$3:$A$5,MATCH($A9,$C$3:$C$5,0))), INDEX($D$3:$D$5,MATCH($A9,$C$3:$C$5,0)),"")
    Does that work for you?
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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