SUMROWS returns the sum of each row in a 2D array (this is not my creation, I first saw this on youtube comment user: cr gr 0912, and also on User Voice, but it is referenced in some of my other functions, so it's here!)
Excel Formula:
=LAMBDA(x,MMULT(x,SEQUENCE(COLUMNS(x),1,1,0)))
Lambda - Last Cell and Split.xlsx | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | C | D | E | F | G | H | I | J | K | L | |||
1 | Original Array | ||||||||||||
2 | 1 | 0 | 3 | 4 | 5 | 6 | 0 | 8 | 0 | 10 | |||
3 | 1 | 2 | 3 | 0 | 5 | 0 | 7 | 0 | 0 | 10 | |||
4 | 1 | 2 | 0 | 4 | 5 | 6 | 7 | 8 | 0 | 0 | |||
5 | |||||||||||||
6 | Sum rows | ||||||||||||
7 | 37 | ||||||||||||
8 | 28 | ||||||||||||
9 | 33 | ||||||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B2:K4 | B2 | ={1,0,3,4,5,6,0,8,0,10;1,2,3,0,5,0,7,0,0,10;1,2,0,4,5,6,7,8,0,0} |
B7:B9 | B7 | =SUMROWS(B2#) |
Dynamic array formulas. |
Upvote
0