Sep 24 2022 06:48 AM
The situation in general
I was hoping that someone could point me at a new function that could simplify this effort. The rollup has many formulas and I would like to make this easier and more productive
Here is the basic formula that is in each cell of each rollup table:
=IF(B2=0,"",SUMPRODUCT(SUMIF(INDIRECT("'"&TabNames&"'!$R$166"),B2,INDIRECT("'"&TabNames&"'!G9"))))
Breakdown
I have 1 of these formulas in each cell of each summary table so it is cumbersome and I would like to learn a bit and use a new function to do this easier if possible. It does all work but I was hoping that I could streamline it with a suggestion of a formula that could replace it.
Hopefully, one of the new lookup formulas could do the same function with multiple criteria or some type of Array or table summation since the tables are identical.
The 35 sheets internal (VBA) names are sequential, Sheet1 – Sheet35, so I can do some “ for-next” loops in VBA if it helps. Just looking for a slick way to improve this.
Sep 24 2022 10:21 AM
You could use 3D-referencing. See here: Help
The problem is that not all formulas work with 3D. SUM works, but unfortunately SUMIF does not. Therefore, I had to reach into my bag of tricks. In the new function VSTACK (currently only available in Microsoft 365 Insider or Excel for the Web) you can use 3D referencing.
=SUM(IF(VSTACK(Sheet1:Sheet35!R166)=B2,VSTACK(Sheet1:Sheet35!G9),0))
If you are not an insider, you can test the whole thing in Excel for the Web.
Good luck!
Sep 24 2022 02:15 PM