+ Reply to Thread
Results 1 to 7 of 7

Sum the values in a column based on the Date ranges

  1. #1
    Registered User
    Join Date
    04-19-2012
    Location
    Phoenix
    MS-Off Ver
    Excel 2007
    Posts
    4

    Sum the values in a column based on the Date ranges

    Hi,

    I have a project where in I have to provide the data by date ranges . The date ranges would be Jan 2011- Jul 2011, Aug 2011 - Dec 2011, YTD. My Input file has the data from Jan 2011 to Jul 2012. The Date field in my file reprsents each month from Jan 2011 to July 2012. I need to sum the CV by Col A, Col B and also in three different date ranges (Please refer the output tab in attached excel) .

    I tried Pivoting the data and using Date filter but could not get the intended results .

    Any help would be highly appreciated. Many Thanks
    Attached Files Attached Files
    Last edited by gl.shruthi; 09-04-2012 at 06:04 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Sum the values in a column based on the Date ranges

    Not 100% sure you can get this done with a pivot table as your dates are not equal parts, but how about this.

    I used some helper cells above which you can easily hide. May be a fancier way to get all of this into one formula without helper cells, but this is my effort.
    Attached Files Attached Files
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    11-16-2011
    Location
    San Diego, California
    MS-Off Ver
    2007
    Posts
    78

    Re: Sum the values in a column based on the Date ranges

    I fideled with this for a while.
    the best solution I found was to make three pivot tables for the three periods and filter by the dates you wanted.

    Example.xlsx

    It got the job done but I'm not sure how useful it will be for you...

  4. #4
    Registered User
    Join Date
    02-29-2012
    Location
    Gloucester, England
    MS-Off Ver
    Excel, Word, Access 2007 and XP
    Posts
    58

    Re: Sum the values in a column based on the Date ranges

    Hi, I think Jeff's solution is good, that's the way I would do it. You could easily tidy up the helper cells to become part of the header row.
    Dave

    I'm no expert I just like solving problems

  5. #5
    Registered User
    Join Date
    11-16-2011
    Location
    San Diego, California
    MS-Off Ver
    2007
    Posts
    78

    Re: Sum the values in a column based on the Date ranges

    I agree, his way is more elegeant than mine.
    It all depends on what you need to do though.

    Quote Originally Posted by Leizure View Post
    Hi, I think Jeff's solution is good, that's the way I would do it. You could easily tidy up the helper cells to become part of the header row.

  6. #6
    Registered User
    Join Date
    04-19-2012
    Location
    Phoenix
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Sum the values in a column based on the Date ranges

    Thanks Jeff and worldbridge...

    Jeff's solution worked for my project.. I made the helper cells as a part of the header...

    Thanks once again.

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Sum the values in a column based on the Date ranges

    You are very welcome and we always appreciate the feedback

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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