Add alternate rows

T

Teri

I can't seem to find how to do this. Want to add every other row in a
worksheet. Any ideas? Thanks!
 
A

Alan Beban

Teri said:
I can't seem to find how to do this. Want to add every other row in a
worksheet. Any ideas? Thanks!
Do you mean 1,3,5,etc. or 2,4,6,etc.?

Alan Beban
 
B

Bob Phillips

=SUMPRODUCT(--(MOD(ROW(A1:A20),2)=0),A1:A20)

will add every even row in column A

=SUMPRODUCT(--(MOD(ROW(A1:A20),2)=1),A1:A20)

adds every odd row

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
A

Aladin Akyurek

Let A2:A400 be the range of interest...

=SUMPRODUCT(--(MOD(ROW(A2:A400)-CELL("Row",A2)+0,H2)=0),A2:A400)
 
T

Teri

AWESOME! That was so easy! Thank you!

Bob Phillips said:
=SUMPRODUCT(--(MOD(ROW(A1:A20),2)=0),A1:A20)

will add every even row in column A

=SUMPRODUCT(--(MOD(ROW(A1:A20),2)=1),A1:A20)

adds every odd row

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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