Forum Discussion

Alexis_Piper's avatar
Alexis_Piper
Copper Contributor
Nov 10, 2023

Last 12 months counting

I am trying to produce a rolling 12 month count sheet that I have attached. In the large part, it works, but as explained in the workbook, sometimes when there is a cell with data that is not counted, because it's counted in a previous month, it stops a count from working later in the year. 

In the doc, Jan 22 is counted on sheet 2 in both cases. Great. Feb 23 is counted in row 2 because there was nothing between those dates. Great. 

The problem is in row 3. Jan 22 is counted. Dec 22 is therefore discounted in Jan 23. I want Feb 23 to return 2 but as Dec 22 and Jan 23 are not 0 it is not working. Can anyone see a way around this?

 

Any help would be greatly appreciated.

 

rolling test.xlsx

  • mathetes's avatar
    mathetes
    Silver Contributor

    Alexis_Piper 

     

    That link doesn't work for folks who aren't part of that particular sharepoint account. So you need to post a copy on OneDrive or GoogleDrive, pasting a link that actually grants access. Or a different category of link that grants access to your Sharepoint area.

    • Alexis_Piper's avatar
      Alexis_Piper
      Copper Contributor
      Thank you Mathetes- I have changed the link- would you mind checking that you can now see it?

      Thanks again,

      Alexis
      • mathetes's avatar
        mathetes
        Silver Contributor

        Alexis_Piper 

         

        What is your definition of a "rolling 12 month count"?

         

        What I have in mind with a rolling 12 months would be a far simpler formula than the one you have. 

        =SUM(Sheet1!D3:O3)

        All it does is get the 12 months up to and including the most recent. And that formula just can be copied across. But you can't begin doing that until the 12th month of any given series. (i.e., you can't do a rolling 12 months in the 10th month...) 

Resources