Dynamic Sum (of every 2nd row) on Range Resize
Author Message
Dynamic Sum (of every 2nd row) on Range Resize

Hi,

I have a sum at the bottom of a column that will be the sum of every second
row in the named range. (A3+A5+A7...)
I also have a function which inserts rows into the range (each insert
inserts two rows).
The rows are always inserted after the first two rows (at A3).
I resize the range and now I need to add the new row to the totals
calculation (which is in the next row below the new named range).
The sum function currently changes to A3+A7+A9 after inserting the two rows.

How can I adjust the sum to sum every second row in the new range (now
A3+A5+A7+A9)?

Thanks alot for any help,
April

Mon, 27 Oct 2003 22:15:17 GMT
Dynamic Sum (of every 2nd row) on Range Resize

Quote:

> Hi,

> I have a sum at the bottom of a column that will be the sum of every second
> row in the named range. (A3+A5+A7...)
> I also have a function which inserts rows into the range (each insert
> inserts two rows).
> The rows are always inserted after the first two rows (at A3).
> I resize the range and now I need to add the new row to the totals
> calculation (which is in the next row below the new named range).
> The sum function currently changes to A3+A7+A9 after inserting the two rows.

> How can I adjust the sum to sum every second row in the new range (now
> A3+A5+A7+A9)?

> Thanks alot for any help,
> April

Where data is your range, array enter (CTRL-SHIFT-ENTER, or CMD-ENTER):

=SUM((MOD(ROW(data), 2)=0)*data)

--

ROT13 encoding, decode for real mail

Mon, 27 Oct 2003 22:26:09 GMT
Dynamic Sum (of every 2nd row) on Range Resize
Thank you very much,
you're a life saver!

I modifed your formula slightly to get what I was actually looking for
=SUM((MOD(ROW(JanPayments),2)=1)*JanPayments)

April

Mon, 27 Oct 2003 22:49:04 GMT

 Page 1 of 1 [ 3 post ]

Relevant Pages