+ Reply to Thread
Results 1 to 5 of 5

Year-to-Date Sums and Averages with different start dates

  1. #1
    Registered User
    Join Date
    02-06-2013
    Location
    chicago, il
    MS-Off Ver
    Excel 2007
    Posts
    2

    Year-to-Date Sums and Averages with different start dates

    Hello,

    I have many phone book ads for which I am tracking the number of unique calls each month. While I have data dating back to 2014, I would like to keep a YTD total and YTD average number of calls. The problem is that the books are all published in different months—so, if one book is published in March, then its "year" would start in March, vs. a book that is published in July, and so on. In the example attached I highlighted each range I would like to calculate. I know that I could manually change the formula for each month, but there are many more books than I show in the example—I was hoping to find a formula based on an entry in another cell, which is why I included columns D & E (and made C number-formatted). Also, if it's worth noting, I will continue to be adding data to this spreadsheet (i.e., into 2016).

    Any advice would be appreciated, thanks!


    RG_Example.xlsx

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Year-to-Date Sums and Averages with different start dates

    It can be done, but your existing format is not completely formula friendly.

    Starting with F2, change 1 to 1/1/2014
    Then in G2, change 2 to 2/1/2014 (I assume that you use the standard US date format, month/day/year)
    Select both of these cells and use the fill handle (move your mouse to the bottom right of G2 so that the + cursor changes from white to black), then hold left click and drag to AC2. The cells will all show #### you can ignore that for a second.

    Next change the number format of those cells to a custom format of m This will give you real dates in those cells, but they will still appear as month only, so it will look the same as before.

    Now, assuming that column C contains the date of the most recent publication, this formula entered in AD3 and filled down will give you total year to date.

    =SUMIFS(F3:AC3,$F$2:$AC$2,">"&EOMONTH(C3,-1),$F$2:$AC$2,"<="&EOMONTH(C3,12))

    And this in in AE3 will give you the average.

    =IFERROR(AVERAGEIFS(F3:AC3,$F$2:$AC$2,">"&EOMONTH(C3,-1),$F$2:$AC$2,"<="&EOMONTH(C3,12)),0)

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Year-to-Date Sums and Averages with different start dates

    Find the attached. Helper cells in AF1 AG1 =year(today()) and =month(today())

    Then array - enter this formula in AD3 and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.In AE3 this regular formula copied down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  4. #4
    Registered User
    Join Date
    02-06-2013
    Location
    chicago, il
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Year-to-Date Sums and Averages with different start dates

    These both work. Thank you for your help!!

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Year-to-Date Sums and Averages with different start dates

    Your are welcome. Thank you for the feedback.

+ 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: 3
    Last Post: 10-06-2015, 05:30 PM
  2. Replies: 1
    Last Post: 04-22-2015, 08:08 AM
  3. Replies: 4
    Last Post: 03-13-2015, 05:34 AM
  4. Input a year to determine the start date for 4-4-5 Calendar Year.
    By mak1176 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-25-2013, 10:34 AM
  5. Replies: 3
    Last Post: 08-14-2012, 05:14 AM
  6. Replies: 1
    Last Post: 06-10-2011, 12:12 PM
  7. Calculating Sums year to date
    By Gti182 in forum Excel General
    Replies: 3
    Last Post: 10-04-2010, 08:12 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