Forum Discussion
Trent_Nagata
Aug 17, 2022Copper Contributor
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...
- Aug 17, 2022
=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.
OliverScheurich
Aug 17, 2022Gold Contributor
=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.
- Trent_NagataAug 17, 2022Copper Contributor
OliverScheurich thank you very much!!!!!