See the data in the image below. I want to calculate the sum of all budgets, planned and actual values for a given Costcode for all months until current month (current month is July).
I tried sumifs and sumproduct as well but couldn't get it to work. Can someone help me?
I appreciate your help a lot.
Your screenshot has some columns hidden, but I assumed that the pattern continued. I also assumed that you would want these totals to change automatically as the months go by. With that being the case, I continued your pattern out for 12 months. Then, I put in 4 summary columns. One for each code vertically and one for each row header. Then, I created this formula in cell AX3 (and copied right and down):
=SUMIFS($B3:$AW3,$B$2:$AW$2,AX$2,$B$1:$AW$1,"<="&(MONTH(TODAY())))
It is an array formula. If you have never used an array formula, follow these steps:
To copy down, follow these steps:
If you don't copy down in this manner, it will tell you that you cannot change the array...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.