Formula Errors

How to Use Excel SUMIFS and SUMPRODUCT to Match Headers and Rows in WPS Spreadsheet

Tauseeq MagsiTauseeq Magsi Nov 13, 2026 870 views

Question details

Learn how to write Excel SUMIFS and SUMPRODUCT formulas to sum values when a header must match or both a row label and a column header must match in WPS Spreadsheet.

How to Use Excel SUMIFS and SUMPRODUCT to Match Headers and Rows in WPS Spreadsheet
Product
WPS Office Spreadsheet
Device & OS
not provided
Scenario
User has a data range with a header row and row labels, and needs to return totals based on a selected header or on both a selected header and row label.
Observed behavior
The correct formula returns the matching total from a simple horizontal range with SUMIFS, and from a two-dimensional data block with SUMPRODUCT.
Before you start

Open your workbook in WPS Spreadsheet and identify whether the criteria are only in a single header row or in both row labels and column headers before choosing the formula.

Solution 1

Use SUMIFS When Only a Horizontal Header Row Must Match

Use this when your data is in a simple horizontal range and you only need to match one column header.

SUMIFS works best when the sum range and criteria range are both in a single row, so the formula returns the value that matches the selected header.

1
Select the result cell

Click the cell where the result should appear, for example K2, next to the row you are summing.

2
Enter the SUMIFS formula

Type =SUMIFS($C2:$F2,$C$1:$F$1,J$1) and press Enter. The sum range is C2:F2 and the criteria range is C1:F1 matched against J1.

Adjust the ranges: Change C2:F2 and C1:F1 to match your actual header row and data row before pressing Enter.
Direct WPS Spreadsheet solution

Write SUMIFS and SUMPRODUCT Matching Formulas in WPS Office

Open your workbook in WPS Spreadsheet, use SUMIFS for single-row header matching and SUMPRODUCT for two-dimensional row and column criteria, and calculate the totals without switching to Microsoft Excel.

  1. 1. Open WPS Office Spreadsheet: Launch WPS Spreadsheets and open the workbook containing your header row and row labels.
  2. 2. Click the result cell: Select the cell where the SUMIFS or SUMPRODUCT total should appear.
  3. 3. Type the formula: Enter =SUMIFS($C2:$F2,$C$1:$F$1,J$1) for a header-only match, or =SUMPRODUCT(($C$1:$F$1=J$1)*($A$2:$A$7=$I2)*$C$2:$F$7) for row and column matches.
  4. 4. Press Enter and verify: Press Enter and confirm that the returned total matches the selected header and row criteria.
Directly supports Excel-style SUMIFS and SUMPRODUCT formulas in WPS SpreadsheetFull compatibility with Microsoft Excel .xlsx and .xls workbooksFree, lightweight Office suite with a familiar formula interfaceHandles header-and-row matching without formula conversionEasy cell reference editing and formula entry
microsoft office alternative - wps office

Frequently Asked Questions

When should I use SUMIFS instead of SUMPRODUCT for matching headers?

Use SUMIFS when the data to sum is in a single row and only the header row must match, such as =SUMIFS($C2:$F2,$C$1:$F$1,J$1).

Can WPS Spreadsheet open Excel files with these formulas?

Yes, WPS Office Spreadsheet supports .xlsx and .xls files, and Excel-style SUMIFS and SUMPRODUCT formulas work without conversion.

Why does my SUMPRODUCT formula return #VALUE! or 0?

Check that all ranges in the formula have the same dimensions. Mismatched ranges in WPS may cause a #VALUE! error, while unmatched criteria can return 0.

How do I fix absolute and relative references in these formulas?

Keep data ranges and header ranges absolute with $ signs so copying the formula still uses the correct header row and label column.

Does SUMPRODUCT work if my row labels are in A2:A7 and headers in C1:F1?

Yes. Use =SUMPRODUCT(($C$1:$F$1=J$1)*($A$2:$A$7=$I2)*$C$2:$F$7) and adjust the target cells to match your own workbook.