summing every other entry in excel

  • Thread starter Thread starter physiker
  • Start date Start date
P

physiker

I would like to know how to sum every other entry in a column of numbers.
This is useful to perform numerical intergration. Thanks.
 
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)
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top