Function Problems

Sum Every Other Cell in Excel Based on a Count

Amos GikundaAmos Gikunda Nov 22, 2026 869 views

Question details

Sum alternating cells in a row, starting at B3, using the count in A1 to determine how many cells to include.

Sum Every Other Cell in Excel Based on a Count
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user wants to add B3, D3, F3, and subsequent alternating cells, potentially through P3.
Observed behavior
The result should include only the number of alternating cells specified in A1.
Before you start

Enter a whole-number count from 0 to 8 in A1. Ensure B3:P3 contains numbers or blank cells, and choose an empty cell outside that range for the formula.

Solution 1Recommended

Use SUMPRODUCT to sum alternating cells through P3

Use this formula when A1 controls how many alternating cells to add, starting with B3.

The formula selects even-numbered columns and limits the selection to the count in A1. For example, a count of 3 sums B3, D3, and F3; a count of 8 includes cells through P3.

1
Enter the count

Select cell A1 and enter the number of alternating cells to sum.

2
Enter the formula

Select an empty cell outside B3:P3 and enter =SUMPRODUCT((MOD(COLUMN(B3:P3),2)=0)*(COLUMN(B3:P3)<=A1*2)*(B3:P3)).

3
Check the result

Press Enter. Change A1 to recalculate the sum for a different number of cells.

Use SUMPRODUCT to sum alternating cells through P3
Extend the range if needed: B3:P3 contains eight alternating cells starting at B3. For a larger count, replace every instance of B3:P3 with a range extending far enough to include the last desired cell.
Sum alternating cells in WPS Spreadsheets

Calculate alternating-cell totals in WPS Spreadsheets

Use the same SUMPRODUCT formula in WPS Spreadsheets to sum every other cell based on the count in A1.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and use Open to select your workbook.
  2. 2. Enter the count: Select A1 and enter a whole number from 0 to 8.
  3. 3. Add the formula: Select an empty cell outside B3:P3 and enter =SUMPRODUCT((MOD(COLUMN(B3:P3),2)=0)*(COLUMN(B3:P3)<=A1*2)*(B3:P3)).
  4. 4. Calculate the total: Press Enter to calculate the sum, then change A1 as needed.
Sum alternating cells with a count-controlled formulaOpen and edit Microsoft Excel XLSX and XLS filesRecalculate totals when the count or source values change
microsoft office alternative - wps office

Frequently Asked Questions

What does the formula sum when A1 is 8?

It sums B3, D3, F3, H3, J3, L3, N3, and P3.

How do I include alternating cells beyond P3?

Extend every B3:P3 reference in the formula to a range that includes the last desired cell. For example, use B3:R3 to allow a count of 9.

Why does the formula return a value error?

Check B3:P3 for text or error values. The multiplication-based formula expects numbers or blank cells throughout the referenced range, including cells that are skipped.

Is SUMPRODUCT the fastest option for a large workbook?

Not necessarily. Performance depends on the workbook and formula design; test alternatives on your own data if calculation speed matters.