Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How to sum an answer tracing upwards until it hits an positive value?

$
0
0

Thx for coming in!I need a formula to trace and sum the value in a column, upwards, until it hit an positive value.

For the following table, A will have the answers, and B will be the column where I need the formula.

I want a non-array formula as manual editing could be needed.

AB
10
00
-1-1
-2-3
-1-4
0-4
-4-8
10

As you can see, I need an non-array formula for each cell in column B.In column A, where the answers appeared, if a negative value starts to show up, and finally a positive number shows up, I see it as a cycle is completed.

In column B it sums up all the negative value in a cycle upwards until it hits an positive value. Of course it also need to skip the value 0 and keep tracing upwards if that happened.

What formula could I use for column B?

Thx again!


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>