sum alternate rows

G

Guest

is there a formula that allows you to sum alternate rows (even vs odd) or
similar? Can this be done with a variation of the "sumif" function?

anand
 
G

Guest

One way ..

In say, B1:
=SUMPRODUCT(--(MOD(ROW(A1:A10),2)=1),A1:A10)
returns the sum of the odd rows within the range A1:A10,
viz the sum of: A1, A3, A5, A7, A9

=SUMPRODUCT(--(MOD(ROW(A1:A10),2)=0),A1:A10)
returns the sum of the even rows within the range A1:A10,
viz the sum of: A2, A4, A6, A8, A10
 
G

Guest

To sum cells A1:A7 that are

EVEN: =SUM(IF(MOD(ROW(A1:A7),2)=0,A1:A7,0))
ODD: =SUM(IF(MOD(ROW(A1:A7),2)=1,A1:A7,0))

Ctrl+Shift+Enter to enter formula
 

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

Top