Function Problems

How to Sum Excel Values Matching Multiple Criteria in WPS Office

Olivia MillerOlivia Miller Nov 13, 2026 869 views

Question details

The user needs to add all values in a worksheet that match two conditions, such as an item code and a country, rather than returning only the first matching value.

How to Sum Excel Values Matching Multiple Criteria in One Cell with WPS Office
Product
WPS Office Spreadsheets
Device & OS
not provided
Scenario
The user has columns such as item code, country, and numeric values, and wants a formula that totals every row matching a specific item code and country.
Observed behavior
A basic lookup returns only the first matching value instead of summing every matching value for the specified criteria.
Before you start

Before writing the formula, confirm which columns contain the sum values and the two criteria columns. Also make sure the criteria cells you plan to reference, such as A2 and B2, contain the item code and country exactly as they appear in the data.

Solution 1Recommended

Use SUMIFS to Sum All Rows Matching Two Criteria

Use this built-in WPS Spreadsheets formula when you want a fast, straightforward way to total every value that matches the specified item code and country.

SUMIFS is designed for multiple criteria. The first argument is the column to sum, and each additional pair defines a criteria range and its condition.

1
Select the result cell

Click the cell where you want the total to appear, such as D2.

2
Enter the SUMIFS formula

Type =SUMIFS(L:L,J:J,A2,K:K,B2) into the cell or the formula bar.

3
Press Enter

Press Enter. If your data uses different columns, adjust L:L, J:J, and K:K to match your worksheet layout.

Use SUMIFS to Sum All Rows Matching Two Criteria
Formula returns the total of all matches: This sums every cell in column L where column J equals the value in A2 and column K equals the value in B2.
WPS Spreadsheets formula solution

Total Matching Values in WPS Office Spreadsheets with SUMIFS

Open your workbook in WPS Office Spreadsheets and use the built-in SUMIFS function to add every value that matches the item code and country criteria. No extra plugins are required.

  1. 1. Open your workbook in WPS Office Spreadsheets: Start WPS Office, click Menu, and open the Excel-compatible file that contains your data.
  2. 2. Select the result cell: Click the empty cell where you want the summed total to be displayed.
  3. 3. Type the SUMIFS formula: In the formula bar, type =SUMIFS(L:L,J:J,A2,K:K,B2), replacing column letters and criteria cell references as needed.
  4. 4. Press Enter: Press Enter to calculate the total of all rows that match both criteria.
  5. 5. Check the result: Confirm that the returned total includes every matching item code and country in your data range.
Returns the total of all matching rows instead of only the first match.Uses standard SUMIFS formulas already familiar to Microsoft Excel users.Fully compatible with .xlsx, .xls, and other Microsoft Office spreadsheet formats.Free and lightweight with a familiar ribbon interface for easy switching from Excel.
microsoft office alternative - wps office

Frequently Asked Questions

What is the difference between SUMIFS and SUMPRODUCT for summing with multiple criteria?

SUMIFS uses explicit criteria ranges and is often easier to read, while SUMPRODUCT multiplies condition arrays and requires fixed ranges. Both return the same total when the ranges and criteria are correct.

Can I use SUMIFS with full column references like L:L?

Yes, WPS Office Spreadsheets accepts full column references such as L:L. For very large sheets, using a limited range like L2:L1000 can improve performance.

How do I add a third condition to a SUMIFS formula?

Add another criteria range and criteria pair after the existing ones, for example =SUMIFS(L:L,J:J,A2,K:K,B2,M:M,C2). Each new condition must be paired as range, criteria.

Why does my SUMIFS formula return 0?

The criteria values may not match exactly. Check for extra spaces, text-formatted numbers, or mismatched cell references, and confirm that the criteria cells contain values exactly as they appear in the data.

Can I apply this to Excel files created in Microsoft Excel?

Yes. WPS Office Spreadsheets opens and saves .xlsx and .xls files, and SUMIFS and SUMPRODUCT formulas work the same way as in Microsoft Excel.