Use SUMPRODUCT to Sum Adjacent Cell Pairs in Excel
Question details
Calculate the sum of products of adjacent cell pairs across a row through a chosen endpoint.

- Product
- Microsoft Excel and WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- A row contains values to multiply in pairs, starting with L4 and M4, then N4 and O4, and continuing to the selected endpoint.
- Observed behavior
- The desired result is one total combining the products of each non-overlapping pair.
Identify the first cell and the final cell of the pairs. The inclusive range must contain an even number of columns; for example, L4:Y4 contains seven pairs.
Sum alternating adjacent pairs with SUMPRODUCT
Use this formula when the first and last cells of the paired range are known.
The formula compares two overlapping ranges and uses a column mask to select only the non-overlapping pairs L4×M4, N4×O4, and so on through X4×Y4.
Click an empty cell outside L4:Y4 where you want the total to appear.
In the cell or formula bar, enter =SUMPRODUCT(L4:X4,M4:Y4,--(MOD(COLUMN(L4:X4)-COLUMN(L4),2)=0)) and press Enter.
For a different endpoint, replace X4 with the cell immediately before the final cell and replace Y4 with the final cell. Keep the two ranges the same size and the full paired range an even number of columns wide.

Sum adjacent cell pairs in WPS Spreadsheets
Use SUMPRODUCT and a column mask in WPS Spreadsheets to calculate a total from adjacent pairs across a row.
- 1. Open your workbook: Open WPS Spreadsheets and use Open to select your workbook.
- 2. Select the result cell: Click an empty cell outside the range you want to calculate.
- 3. Enter SUMPRODUCT: Type =SUMPRODUCT(L4:X4,M4:Y4,--(MOD(COLUMN(L4:X4)-COLUMN(L4),2)=0)) in the cell or formula bar, then press Enter.
- 4. Set your endpoint: If needed, edit the formula bar to replace both X4 references with the cell before your endpoint and Y4 with the endpoint.

Frequently Asked Questions
Which pairs does the example formula calculate?
For L4:Y4, it calculates L4×M4, N4×O4, P4×Q4, R4×S4, T4×U4, V4×W4, and X4×Y4, then adds the products.
How do I end the calculation at Q4 instead?
Use =SUMPRODUCT(L4:P4,M4:Q4,--(MOD(COLUMN(L4:P4)-COLUMN(L4),2)=0)). This includes the pairs L4:M4, N4:O4, and P4:Q4.
What if the selected range has an odd number of cells?
Choose an endpoint that makes the inclusive range an even number of columns wide. Otherwise, the last cell cannot form a complete adjacent pair.
Can I use INDIRECT to set the endpoint from a cell?
Yes, but INDIRECT is volatile and its text references may not adjust safely when rows or columns are changed. For a fixed endpoint, edit the range references directly in the formula bar.




