M
M
macstuff2020-12-05 10:15:13
excel
macstuff, 2020-12-05 10:15:13

How to calculate the sum until 0 appears in a cell?

There is a column consisting of cells 0 and 1, how can you count the number of 1 until the first 0 is reached

. In the example, you need to get 4

5fcb3371c21a1025409032.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
John Smith, 2020-12-05
@macstuff

For example, the range A1:A7
formula
=SUM(A1:INDEX($A$1:$A$7;MATCH(0;$A$1:$A$7;0)))
5fcb93fd8bcd9417420232.jpeg
here the first argument of Match is the required zero cell.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question