Summing up a code from multiple sheets in the same workbook

Copper Contributor

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.

3 Replies

@Helen15 

 

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.

@mathetes  thank you for your reply however the excel workbook was just an example the proper file I need help with the codes are not in the same order and hence this calculation would not work. Thank you though 

@Helen15 

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)
)