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  
 
 [ 3 post ] 

 Relevant Pages 

1. Delete every 2nd and 3rd row- VBA

2. Deleting every 2nd and 3rd row

3. Every 2nd row bold, how to?

4. Resizing a range and sum values

5. Sum every fourth row.

6. Sum every third row.

7. Summing every third or fourth row etc....

8. Sum every Nth row... with conditions

9. Sum every third cell in a row.

10. How to sum every 2 row of data


 
Powered by phpBB® Forum Software © phpBB Group