+ Reply to Thread
Results 1 to 13 of 13

Formula to sum sales over 12 month period not based on calendar year

  1. #1
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Formula to sum sales over 12 month period not based on calendar year

    Would appreciate some expert assistance in solving a problem I am having in writing a formula that will sum data for a 12 month period that is not based on a calendar year. For example may have data starting in June 2011 running to date, but not every month. If I set a start date for Year 1, say April 2012, I need to see Year 0 numbers (anything prior to April 2012), Year 1 numbers (April 2012 to March 2013), Year 2 numbers (April 2013 to March 2014), and so on. Date format is currently mmm-yy.

    If this could be performed via a macro which references the database (spreadsheet), then even better. The database will contain multiple columns, of which two will contain the date and corresponding number respectively.

    Many thanks in advance

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Formula to sum sales over 12 month period not based on calendar year

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Quang PT

  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: Formula to sum sales over 12 month period not based on calendar year

    HI,

    You don't need macros unless there's some over-riding reason. Normal functions will do.

    The precise syntax of the function(s) depends of course on your layout, so upload the workbook and manually add some examples of the results you expect to see.
    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
    05-24-2013
    Location
    Houston, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Formula to sum sales over 12 month period not based on calendar year

    Have uploaded file with explanation (clear I hope) of what I am trying to do. Apologies for not having done so before, but am very new to the forum.
    Attached Files Attached Files

  5. #5
    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: Formula to sum sales over 12 month period not based on calendar year

    Hi,

    Clarification please.

    Take Project II Pre Sales cell S8. You show 201,804. Filtering the Data sheet for this project with EPS and dates column F pre December 2008 gives 201,558,889.21. I'm assuming you're expressing this in thousands and hence 201,558 (or perhaps rounded 201,559).

    Similarly with year 1. i.e. Dec 2008 through to November 2009, the data shows 15,893,445 (or /1000 = 15893) vs your calculation of 15,180

    Can you explain these discrepancies

  6. #6
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Formula to sum sales over 12 month period not based on calendar year

    Thank you for your quick reply.

    Yes, currently there are discrepancies based on the criteria I am setting for the calculation. Theoretically it is possible for EPS sales to occur after a close date, though only for a few months. I was not sure if it was possible to include these in the Year 0 figure once the close date had been set. The numbers you see at the moment are someones subjective interpretation entered manually. I am trying to automate as much as I can. Sales for Year 1 onwards can only have references PLS, SHS, and TFR.

    Lastly the numbers in Analysis sheet should be rounded to thousands. The information in the Data sheet is gathered from an external source, from which the output unfortunately cannot be formatted.

    Hope this helps.

  7. #7
    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: Formula to sum sales over 12 month period not based on calendar year

    Hi,

    Thanks for the clarification. the references to PLS, SHS & TFR were new.

    Your 'theoretically...' question might be able to be accommodated but you'll need to define a rule precisely. Excel can't work with stuff like 'possible' and a 'few months' unless you can accurately define those terms.

    Otherwise see attached.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Formula to sum sales over 12 month period not based on calendar year

    Apologies for the delayed reply. Just wanted to let you know that the formulas in your file have worked. Many thanks for your input and help. It is much appreciated !

  9. #9
    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: Formula to sum sales over 12 month period not based on calendar year

    Hi,

    Glad to have been able to help and thanks for the rep. Since this appears to take care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  10. #10
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Formula to sum sales over 12 month period not based on calendar year

    I have re-opened the thread as I have been given additional data. The file will now have to include a calculation for projects that have no Year 1 Start Date. These projects will have revenue (Type EPS). I have tried modifying your formula for this , but am producing a result of double the figure it should be. For example Project XIV EPS revenue - 88,400.

  11. #11
    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: Formula to sum sales over 12 month period not based on calendar year

    Hi,

    I don't understand.

    Looking at the Data if I filter for project xiv, type EPS I see the total amount is 44,199,990.37, which is I presume the number you're looking for in an amended formula. However I don't understand the remark about Year 1 Start dates. The project xiv does have some 2013 (Year 1) start dates. Are you wanting to exclude thse - but in which case the toyal won;t be what you're looking for.

    What's the amended formula you're trying

  12. #12
    Registered User
    Join Date
    05-24-2013
    Location
    Houston, USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Formula to sum sales over 12 month period not based on calendar year

    Thank you for your quick reply. Apologies for the confused explanation.

    What I now need to happen is 44,200 appearing in the Pre-Commit column (S) regardless of whether there is a start date in column E. Essentially the formula needs to allow for both possibilities. I tried modifying the formula as follows, but if there is a start date it just doubles the total - =SUMIFS(Amount,StartDate,"<"&$E18,ProjName,$D18,Type,"EPS")/1000+SUMIFS(Amount,ProjName,$D18,Type,"EPS")/1000

    I have experimented with IF/AND/OR, but to no avail. Possibly that is the answer, but my expertise does not extend that far.

    If you are able to provide a solution I would be very grateful.

  13. #13
    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: Formula to sum sales over 12 month period not based on calendar year

    Hi,

    Just take out any reference to the start date. i.e.

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

+ 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: 2
    Last Post: 07-31-2013, 02:00 PM
  2. [SOLVED] Making data static based upon Month of Calendar Year
    By rishinag in forum Excel General
    Replies: 1
    Last Post: 04-01-2013, 03:17 AM
  3. Counting multiple customer sales over 3 month period
    By GillyUK in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2013, 12:28 PM
  4. Replies: 3
    Last Post: 03-03-2011, 07:17 PM
  5. [SOLVED] Days in month for 10 year period
    By Geoff in forum Excel General
    Replies: 4
    Last Post: 05-06-2005, 12:06 PM

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