Home » excel » Excel: Which row's sum equals to a number?

Excel: Which row's sum equals to a number?

Posted by: admin May 14, 2020 Leave a comment

Questions:

For example I have this sheet:

enter image description here

I want to find the row that sum’s equals to 10. I already tried MATCH with multiple criteria but it didn’t work like I imagine.

For example first row’s sum is: 14, second is 5, third is 0; while 4th is 10, so I want to get row 4.

I want to do it without adding another column/row

How to&Answers:

Use:

=MATCH(10,A1:A4+B1:B4+C1:C4+D1:D4+E1:E4,0)

This is an array formula and must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.

enter image description here


EDIT:

Found a different array formula that uses full ranges:

=MATCH(10,MMULT(A1:E4,TRANSPOSE(COLUMN(A1:E4)^0)),0)

Again being an array formula it must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.

enter image description here