Forum Discussion
Helen15
Sep 11, 2023Copper Contributor
Summing up a code from multiple sheets in the same workbook
Can someone please help me. I want to sum up several tabs into a main consolidated tab for certain codes and my formula that I thought would work, doesn't. I have attached a file to help explain what I want. Any help much appreciated.
- mathetesSilver Contributor
Since the source sheets contain exactly the same codes in exactly the same order, it would seem that you don't need SUMIF. A simple SUM function works.
=SUM(a:d!B3)
copied down.
So unless your actual need is not what your example illustrated, you've been making it more complicated than need be.
- Patrick2788Silver Contributor
If you have Excel 365, you could stack the sheets and summarize.
For example:
=LET( stack, VSTACK(AllSheets), Sum3D, LAMBDA(row, LET(ID, TAKE(stack, , 1), val, TAKE(stack, , -1), SUM(FILTER(val, ID = row, 0)))), BYROW(MyIDs, Sum3D) )