# Sum every other column

#### himperson1

##### New Member
Hello all,

I am looking for a formula to sum the contents of every other column/array. i am currently using
=SUMPRODUCT(--(MOD(COLUMN(A1:E1)-COLUMN(A1)+1,2)=1),A1:E1) which works great for adding every other CELL in row 1, but I am looking to add the cells below those as well

 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5

<tbody>
</tbody>

I am trying to get the sum (3+9+15)=27

Last edited:

### Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

#### Eric W

##### MrExcel MVP
Try:

=SUMPRODUCT(MOD(COLUMN(A1:E3),2)*A1:E3)

#### himperson1

##### New Member
this worked, thank you.

i have altered it to suit my needs which results in:

=SUMPRODUCT(MOD(COLUMN(A1:E3)-COLUMN(A1)+1,2)*A1:E3)

so that the array can begin in any column

#### Eric W

##### MrExcel MVP
You're welcome. I'm glad you got it to work.

#### himperson1

##### New Member
this worked, thank you.

i have altered it to suit my needs which results in:

=SUMPRODUCT(MOD(COLUMN(A1:E3)-COLUMN(A1)+1,2)*A1:E3)

so that the array can begin in any column
For posterity:

=SUMPRODUCT(--(MOD(COLUMN(A1:E1)-COLUMN(A1)+1,X)=1),A1:E1)

using this version, changing X to any n digit will correctly allow summation of every other nth column starting anywhere on the worksheet. previous iteration only works for every other column (X = 2).

Last edited:

##### MrExcel MVP
For posterity:

=SUMPRODUCT(--(MOD(COLUMN(A1:E1)-COLUMN(A1)+1,X)=1),A1:E1)

using this version, changing X to any n digit will correctly allow summation of every other nth column starting anywhere on the worksheet. previous iteration only works for every other column (X = 2).

I introduced this eons ago... what I call the robust approach:

1.

=SUMPRODUCT(--(MOD(COLUMN(A1:E1)-COLUMN(A1),X)=0),A1:E1)

which begins summing with the first cell of the reference.

2.

=SUMPRODUCT(--(MOD(COLUMN(A1:E1)-COLUMN(A1)+1,X)=0),A1:E1)

which begins summing with the Xth cell of the reference.

Replies
3
Views
364
Replies
3
Views
63
Replies
5
Views
165
Replies
3
Views
44
Replies
3
Views
102

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,903
Messages
5,834,309
Members
430,276
Latest member
legalcriminal015

### 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.

### Which adblocker are you using?

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

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