Sum rows every nth column

2077delta

Active Member
Joined
Feb 17, 2002
Messages
252
Office Version
  1. 365
Platform
  1. Windows
Is there a way to sum a range of rows every nth column. For example I want to sum rows 10 - 30 every 4th column. Can I use SUMIFS somehow to do this?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Do you mean like this:

Assuming rng: B10:N13
B15: =SUMPRODUCT(rng*(MOD(COLUMN(rng)-COLUMN(INDEX(rng,,1)),4)=0))
Or =SUMPRODUCT(B10:N13*(MOD(COLUMN(B10:N13)-COLUMN(B10),4)=0))


Excel 2010
BCDEFGHIJKLMN
1015913
11261014
12371115
13481216
14
15136
1
 
Last edited:
Upvote 0
Something like this? You'll need to hit CONTROL+SHIFT+ENTER as the formula uses arrays.

[TABLE="class: grid, width: 414"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]...[/TD]
[TD]AB[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]n=[/TD]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Sum columns:[/TD]
[TD="align: right"]=SUM(IF(MOD(COLUMN(A$5:AB$104),B1)=0,A$5:AB$104))[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]0.371155968[/TD]
[TD="align: right"]0.702672[/TD]
[TD="align: right"]0.468813[/TD]
[TD="align: right"]0.410523[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]0.396036[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]0.426536578[/TD]
[TD="align: right"]0.464798[/TD]
[TD="align: right"]0.02317[/TD]
[TD="align: right"]0.242622[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]0.174385[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]0.424560384[/TD]
[TD="align: right"]0.243813[/TD]
[TD="align: right"]0.21639[/TD]
[TD="align: right"]0.327721[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]0.001815[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]0.043125384[/TD]
[TD="align: right"]0.579772[/TD]
[TD="align: right"]0.04318[/TD]
[TD="align: right"]0.087144[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]0.319651[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]0.711210033[/TD]
[TD="align: right"]0.584506[/TD]
[TD="align: right"]0.583156[/TD]
[TD="align: right"]0.307808[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]0.160351[/TD]
[/TR]
[TR]
[TD="align: right"]...[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]...[/TD]
[/TR]
[TR]
[TD="align: right"]102[/TD]
[TD="align: right"]0.217490312[/TD]
[TD="align: right"]0.205901[/TD]
[TD="align: right"]0.017295[/TD]
[TD="align: right"]0.554897[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]0.310382[/TD]
[/TR]
[TR]
[TD="align: right"]103[/TD]
[TD="align: right"]0.34791251[/TD]
[TD="align: right"]0.840192[/TD]
[TD="align: right"]0.504437[/TD]
[TD="align: right"]0.080458[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]0.917384[/TD]
[/TR]
[TR]
[TD="align: right"]104[/TD]
[TD="align: right"]0.122595243[/TD]
[TD="align: right"]0.650957[/TD]
[TD="align: right"]0.587608[/TD]
[TD="align: right"]0.886758[/TD]
[TD="align: right"]...[/TD]
[TD="align: right"]0.405192[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top