View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dominic
 
Posts: n/a
Default Sum function that add every 13th row...

Greg,

Range("D26").Value = Mysum <--- sub D26 for cell of choice

HTH


"Greg" wrote:

That works ok but is there some kind of function, so I can place it a cell
and copy and paste it accross many cells? Please advise.
Thanks!!



"Toppers" wrote:

Sub Sum13

Dim sum as Double
Dim row as integer, col as integer

MySum =0
col=3 '<=== change to suit
For row=18 to 226 step 13
Mysum=Mysum+cells(row,col)
next row

msgbox Mysum

end Sub


HTH

"Greg" wrote:

Is it possible to sum a column starting from row 18 and ending at row 226
only summing every 13th row. For example, sum the following rows
18,31,44,57,70 ... 226? Please help!!
Thanks in advance!! :)