Forum Discussion

Trent_Nagata's avatar
Trent_Nagata
Copper Contributor
Aug 17, 2022
Solved

Using a formula to sum annual totals based on "Last Month" and "Year the Last Month is in"

I have monthly totals over multiple years that I need to sum trailing 12 month totals when given the "Last Month" and the "Year" the last month is in.  For example, I have the "Months" as columns (st...
  • OliverScheurich's avatar
    Aug 17, 2022

    Trent_Nagata 

    =SUM(OFFSET($B$2,MATCH(B16,$A$2:$A$13,0)-1,0,1,MATCH(C16,$B$1:$M$1,0)))+SUM(OFFSET($B$2,MATCH(B16,$A$2:$A$13,0)-2,MATCH(C16,$B$1:$M$1,0),1,13-MATCH(C16,$B$1:$M$1,0)))

    You can try this formula which returns the expected results in my sheet with the assumption that there are no entries in column N.

     

Resources