+ Reply to Thread
Results 1 to 7 of 7

Sum by date ranges...

  1. #1
    Registered User
    Join Date
    07-25-2010
    Location
    PA
    MS-Off Ver
    Excel 365
    Posts
    47

    Sum by date ranges...

    Hello All,

    I have a sheet that has about 1200 rows. Each row has multiple columns. Date (MMDDYY), Total value, description.

    On another page I want to figure out how to add the total values if the dates fall into certain ranges.

    -Three Months or less
    -Over three months through 12 months
    -Over one year through 3 years
    etc

    it needs to reference the report date say cell A1. and calculate the ranges that way.

    so if the dates are Over one year through 3 years from today add up the totals.

    is what I'm asking even possible?


    Thank you all very much.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Sum by date ranges...

    Try using SUMIFS, something like this:

    =SUMIFS(Value_range,Date_range,">="&EDATE(A1,12),Date_range,"<"&EDATE(A1,3))

    So that uses a date in A1 as the reference (today's date?) and then sums for all dates between 3 and 12 months ago, adapt to suit
    Audere est facere

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Sum by date ranges...

    The approach I'd use is a Pivot Table

    Add an additional helper column which works out which age band the record belongs in. e.g.

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


    That will cater for the 3 groups you indicate. Just add more IF statements if there are only two or three etcs.

    Otherwise create a lookup table and with 0,3,12,36...in the first column and <3, 3-12 months, over 12 months...ect in the 2nd columns and use the following formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    07-25-2010
    Location
    PA
    MS-Off Ver
    Excel 365
    Posts
    47

    Re: Sum by date ranges...

    Thank you both very much, I will mess around with both solutions and find what works...

  5. #5
    Registered User
    Join Date
    07-25-2010
    Location
    PA
    MS-Off Ver
    Excel 365
    Posts
    47

    Re: Sum by date ranges...

    Thank you for your suggestions, I am clearly doing something wrong...

    this is the formula I am using:
    SUMIFS('Report'!$H$2:$H$1200,'Report'!$L$2:$L$1200,">="&EDATE(Maturity!$B$2,3),'Report'!$L$2:$L$1200,"<"&EDATE(Maturity!$B$2,12))

    Where: "H" is the values I'm trying to add
    "L" is the column with dates
    "B" is the reference date.

    and I'm getting 0 for every value which doesn't make any sense.


    These are the categories I'm trying to fill...

    Three Months or Less
    Over three months through 12 months
    Over one year through 3 years
    Over 3 years through 5 years
    Over 5 years through 15 years
    Over 15 years

    Thank you all for your help...

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,366

    Re: Sum by date ranges...

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Sum by date ranges...

    Sorry, my example wasn't very good - for past dates you probably need to use a negative number in EDATE, so if Maturity!$B$2 is a current date then for summing between 12 and 3 months before that date try

    =SUMIFS('Report'!$H$2:$H$1200,'Report'!$L$2:$L$1200,">="&EDATE(Maturity!$B$2,-12),'Report'!$L$2:$L$1200,"<"&EDATE(Maturity!$B$2,-3))

+ 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: 0
    Last Post: 01-30-2016, 11:49 AM
  2. Replies: 2
    Last Post: 08-16-2013, 10:18 AM
  3. Make date ranges for graph (choose start and finish date)
    By zeko90 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-23-2013, 09:13 AM
  4. [SOLVED] Counting the number of times a date occurs in multiple start and end date ranges.
    By Grizz in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 03-05-2013, 04:41 PM
  5. Analyse date frequency cross-referencing multiple date ranges
    By globalpontoon in forum Excel General
    Replies: 2
    Last Post: 05-15-2012, 04:24 PM
  6. Replies: 5
    Last Post: 02-10-2012, 12:52 PM
  7. Excel 2007 : Date ranges withing date ranges
    By Sazza in forum Excel General
    Replies: 4
    Last Post: 07-14-2011, 06:56 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