# Partial sums of a column of values

I have a column of values like this:

0`

1

3

0

0

12

45

56

0

How do I compute the subtotals of contiguous nonzero numbers?

First time here? Check out the FAQ!

Partial sums of a column of values

0`

1

3

0

0

12

45

56

0

How do I compute the subtotals of contiguous nonzero numbers?

add a comment

0

See this example.

===Edit1: Enhanced Example===

Here it is.

Thanks! I understand that the A2:A1001 is assumed to be the maximum run the data can have?

~~It's not just the maximum run (of non-zero values), but the maximum range of any values.~~

You were right - basically. The range of 1000 rows moves down with the starting row. That's not a really satisfying solution. (It seems I had a kind of blackout.)

To expand the range without too much decrease in efficiency can be achieved using helper formulae that only need to look at two rows instead of many. The partial sums can then be taken from a "Pivot Table".

See the enhanced example.

Wow, you already did what I have to accomplished next. Thank you very much!

Asked: ** 2019-02-23 01:53:51 +0200 **

Seen: **58 times**

Last updated: **Feb 23**

Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.