# Summing every other row

#### jcg

##### Board Regular
I have 235 row the odd rows representing numbers from 2006 the even rows representing numbers from 2007. Is there a way to "sumif" based upon the row being either odd or even?

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

#### Seti

##### Well-known Member
For the odd rows:

=SUMPRODUCT(\$B\$3:\$B\$26,--(1=MOD(ROW(\$B\$3:\$B\$26),2)))

and for the even rows:

=SUMPRODUCT(\$B\$3:\$B\$26,--(0=MOD(ROW(\$B\$3:\$B\$26),2)))

#### S.H.A.D.O.

##### Well-known Member
Hi jcg,

An Alternative Solution could be :-

For the Even Rows ...

=SUM(IF(MOD(ROW(B2:B100),2)=0,B2:B100))

... and for the Odd Rows ...

=SUM(IF(MOD(ROW(B2:B100),2)=1,B2:B100))

Assuming your Data is in Cells B2:B100. Adjust to Suit your Ranges. Both Formulas should be Array Entered ( Ctrl+Shift+Enter ).

Hope this Helps.
All the Best.

Replies
4
Views
51
Replies
2
Views
80
Replies
1
Views
181
Replies
19
Views
195
Replies
2
Views
93