I'm trying to remove the double values of the first column and make the sum of the values in the others column for this double.
I'm using dynamics arrays of Excel 365 (In French), I will try to translate correctly the formula.
So I have this data sheet:
I make it dynamic array using Filter for example in te cell G5:
=FILTER(B5:E10;B5:B10<>"")
And the goal is to obtain dynamicly this table:
I can filter the first column like this:
=UNIQUE(CHOOSECOL(G5#;1))
But now, how to summarize dynamically the other columns?
When I'm using this formula, it doesn't work :
=SUM.IF(CHOOSECOL(G5#;1);G12#;CHOOSECOL(G5#;2))
But this one work:
=SUM.IF(G5:G10;G12#;H5:H10)
How to get it?
You could try using MMULT( )
• Formula used in cell F1
=LET(
a,A1:D7,
b,TAKE(a,1),
c,DROP(a,1),
d,TAKE(c,,1),
e,UNIQUE(d),
f,DROP(c,,1),
VSTACK(b,HSTACK(e,MMULT(N(TOROW(d)=e),f))))
Or, you could Code-Golf it
• Formula used in cell F2
=LET(
a,N(A2:A7=TOROW(A2:A7)),
VSTACK(A1:D1,
UNIQUE(HSTACK(A2:A7,MMULT(a,B2:D7)))))