Summing Every Third Number

T

tclark14

Is there a formula to sum every second number in a columm, or ever
third number, whatever the case may be?

Thanks!
Terr
 
B

Bob Phillips

Hi Terry,

Try

=SUMPRODUCT(--(MOD(A1:A9,3)=0),A1:A9)

adjust the = 0 to change the row being counted.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
I

icestationzbra

chip pearson's website has a downloadble file for this scenario, file i
called sumevery.xls.

following is a excerpt from it:

*****

Use these formulas when the data DOES start in row 1.
To start in row N, and sum rows N, 2N, 3N, etc, use
=SUM(IF(MOD(ROW($A$1:$A$20),$D$1)=0,$A$1:$A$20,0))
63

To start in row 1, and sum rows 1, 1+N, 1+(2N),etc use
=SUM(IF(MOD(ROW($A$1:$A$20)-1,$D$1)=0,$A$1:$A$20,0))
70

*****

Use these formulas when the data does NOT start in row 1.
To start in row N (of the range), and sum rows N, 2N, 3N, etc
use
=SUM(IF(MOD(ROW($B$3:$B$22)-ROW($B$3)+1,$D$1)=0,$B$3:B$20,0))
63

To start in row 1 (of the range), and sum rows 1, 1+N, 1+(2N),et
use
=SUM(IF(MOD(ROW($B$3:$B$22)-ROW($B$3),$D$1)=0,$B$3:B$22,0))
70

****
 
M

Myrna Larson

Hi, Bob:

I *know* you meant to write

--(MOD(ROW(A1:A9),3)=0)

i.e. the MOD operates on the the row number, not the data.

Myrna Larson
 
Top