Need to get the total sum at the bottom for each value in the first row if they are same. I tried Subtotal(9,range) but this requires lot of manual work. I have around 1000+ rows which needs to be summed.
Example of the problem in the picture below. (colored cells)
Use SUM()
with FILTER()
. BYROW()
is for dynamic spill array to iterate criteria's.
=BYROW($A$13:$A$15,LAMBDA(x,SUM(FILTER(B$2:B$9,$A$2:$A$9=x))))
All in one formula-
=LET(
id,UNIQUE(A2:A9),
x,MAKEARRAY(ROWS(id),COLUMNS(B2:D9),LAMBDA(r,c,SUM(CHOOSECOLS(FILTER(B2:D9,A2:A9=r),c)))),
HSTACK(id,x))