How to sum every other column in Excel
Formula (Excel and Google Sheets)
=SUMPRODUCT((MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2)=0)*B2:G2)Test each column's position with MOD: =SUMPRODUCT((MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2)=0)*B2:G2) adds the 2nd, 4th and 6th columns.
- Result on the example
- one result per row in
H2, filled down toH5 - Works in
- Every current version
- Google Sheets
- Same formula
See it work
The formula is already in H2, filled down to H5. Change any input and the result updates, or edit the formula to experiment.
How it works
COLUMN(B2:G2)-COLUMN(B2)+1 numbers the columns 1 to 6. MOD with 2 is 0 for columns 2, 4 and 6, the actuals, and SUMPRODUCT adds those values. Filling down moves the row while the pattern stays the same.
=SUMPRODUCT((MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2)=0)*B2:G2)Result159170
B2:G21 row × 6 cols: $52,000, $49,870, $54,000, $55,320, …A range: 6 cells in one row.
COLUMN(B2:G2){1 row × 6 cols} 2, 3, 4, 5, …COLUMN: Column number of a reference, or of this cell.- reference
B2:G21 row × 6 cols: $52,000, $49,870, $54,000, $55,320, …
- reference
B2$52,000The value in B2.
COLUMN(B2)2COLUMN: Column number of a reference, or of this cell.- reference
B2$52,000
- reference
COLUMN(B2:G2)-COLUMN(B2){1 row × 6 cols} 0, 1, 2, 3, …The - operator subtracts.
COLUMN(B2:G2)-COLUMN(B2)+1{1 row × 6 cols} 1, 2, 3, 4, …The + operator adds.
MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2){1 row × 6 cols} 1, 0, 1, 0, …MOD: Remainder after division.- number
COLUMN(B2:G2)-COLUMN(B2)+1{1 row × 6 cols} 1, 2, 3, 4, … - divisor
2
- number
MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2)=0{1 row × 6 cols} FALSE, TRUE, FALSE, TRUE, …The = operator tests whether the two sides are equal.
MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2)=0)*B2:G2{1 row × 6 cols} 0, 49870, 0, 55320, …The * operator multiplies.
SUMPRODUCT((MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2)=0)*B2:G2)159170SUMPRODUCT: Multiplies arrays row by row and adds the results.- array1
MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2)=0)*B2:G2{1 row × 6 cols} 0, 49870, 0, 55320, …
- array1
In Google Sheets
The same formula works in Google Sheets: =SUMPRODUCT((MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2)=0)*B2:G2). We ran it in Google Sheets mode on the same data and it returns the same results.
Other ways to do it
Each one was run on the same example sheet.
| Formula | Result | When to use it |
|---|---|---|
| =SUMIF($B$1:$G$1,"*actual",B2:G2) | $159,170, $191,400, $116,545… | When the headers say what each column is, SUMIF across the header row is clearer and doesn't depend on the column order. |
Common mistakes
- Inserting a column between the quarters breaks the every-other pattern. Summing by header text keeps working.
- Use
=0for even positions and=1for odd ones. Getting it backwards adds the plans instead of the actuals.
Try it yourself
Same data, empty answer cell. Your formula is graded instantly, then re-checked on changed data, so a typed-in number won't pass.
Sum every other column
H2, add up the actual columns (every second column of B2:G2), then fill down to H5.Questions
How do I sum every third column?
Change the 2 to a 3: MOD(COLUMN(B2:G2)-COLUMN(B2)+1,3)=0.
How do I sum the plan columns instead?
Test for odd positions: =SUMPRODUCT((MOD(COLUMN(B2:G2)-COLUMN(B2)+1,2)=1)*B2:G2).
Checked by running on 2026-10-30: every formula and result on this page was calculated by the Spreadsheet Practice formula engine, in both Excel and Google Sheets modes.