ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   summing every other entry in excel (https://www.excelbanter.com/excel-worksheet-functions/198757-summing-every-other-entry-excel.html)

physiker

summing every other entry in excel
 
I would like to know how to sum every other entry in a column of numbers.
This is useful to perform numerical intergration. Thanks.

T. Valko

summing every other entry in excel
 
Try one of these:

This will sum the odd numbered rows:

=SUMPRODUCT(--(MOD(ROW(D7:D17)-ROW(D7),2)=0),D7:D17)

This will sum the even numbered rows:

=SUMPRODUCT(--(MOD(ROW(D7:D17)-ROW(D7),2)=1),D7:D17)

--
Biff
Microsoft Excel MVP


"physiker" wrote in message
...
I would like to know how to sum every other entry in a column of numbers.
This is useful to perform numerical intergration. Thanks.




physiker

summing every other entry in excel
 
Thanks very much. It works great. Small point: I find that the formulas are
reversed; i.e., the first formula sums the even rows (starting with row 1)
and the second the odd rows. Thanks again.

Physiker

"T. Valko" wrote:

Try one of these:

This will sum the odd numbered rows:

=SUMPRODUCT(--(MOD(ROW(D7:D17)-ROW(D7),2)=0),D7:D17)

This will sum the even numbered rows:

=SUMPRODUCT(--(MOD(ROW(D7:D17)-ROW(D7),2)=1),D7:D17)

--
Biff
Microsoft Excel MVP


"physiker" wrote in message
...
I would like to know how to sum every other entry in a column of numbers.
This is useful to perform numerical intergration. Thanks.





T. Valko

summing every other entry in excel
 
You're welcome!

I find that the formulas are reversed; i.e., the first formula
sums the even rows (starting with row 1) and the second
the odd rows


No, the first formula sums the the odd numbered rows like 1,3,5,7,9.

The second formula sums the even numbered rows like 2,4,6,8,10.

The formula is using absolute row evaluation. If your range was A2:A13, A2
is an *even numbered row* even though it's the 1st (odd numbered) row
*relative* to the range.

--
Biff
Microsoft Excel MVP


"physiker" wrote in message
...
Thanks very much. It works great. Small point: I find that the formulas
are
reversed; i.e., the first formula sums the even rows (starting with row 1)
and the second the odd rows. Thanks again.

Physiker

"T. Valko" wrote:

Try one of these:

This will sum the odd numbered rows:

=SUMPRODUCT(--(MOD(ROW(D7:D17)-ROW(D7),2)=0),D7:D17)

This will sum the even numbered rows:

=SUMPRODUCT(--(MOD(ROW(D7:D17)-ROW(D7),2)=1),D7:D17)

--
Biff
Microsoft Excel MVP


"physiker" wrote in message
...
I would like to know how to sum every other entry in a column of
numbers.
This is useful to perform numerical intergration. Thanks.








All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com