View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Sum of every nth cell in a column

That is an array formula so it must be committed with Shift + Ctrl + <Enter.
here is how it works...

Moving down through cells C2:C213 it looks at each 2 things. The value of
the cell and the row that cell is on. If the row that cell is on is +1 is
evenly divisible by 1 then it multiplies the value of that cell by 1. If it
is not evenly divisible it multiplies the value by zero.

So Cell C3 is on row 3. 3 + 1 is evenly divisible by 1 so it multiples the
value of the cell by 1. C7 is 7+1 which is divisible...

In the end it just adds the total. Anything on a row not evenly divisible
was multiplied by 0. Anything multipled by 1 is itself.

Row returns the row of the cell.
Mod returns the remainder of the division.
--
HTH...

Jim Thomlinson


"SnackFoodGirl" wrote:

I am trying to figure out the formula for adding the nth cell in a given
column. I am using the formula below to add every 4th cell but it is just one
that I found on line. Can someone explain to me the components of this
formula so I can adapt it?

=SUM((C2:C213) * (MOD( ROW( C2:C213)+1, 4)=0))