Function Problems

Use SUMIFS in Excel to Sum Values Based on Two Conditions

Maira MehtabMaira Mehtab Dec 2, 2026 868 views

Question details

Sum values in column H only when the corresponding values in column E equal 1000 and those in column G equal 9.

Sum Values Based on Two Conditions in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains values to total in column H and two criteria in columns E and G.
Observed behavior
The desired total includes only rows that meet both conditions.
Before you start

Check that the data to evaluate is in rows 2 through 25 and that columns E, G, and H contain the expected numeric values. If your data covers different rows, adjust all three ranges to cover the same rows.

Solution 1Recommended

Use SUMIFS to Apply Both Conditions

Use SUMIFS to add values in column H only when both criteria match on the same row.

1
Select a result cell

Click an empty cell outside the data range where you want the total to appear.

2
Enter the SUMIFS formula

Type =SUMIFS(H2:H25,E2:E25,1000,G2:G25,9) in the selected cell or formula bar.

3
Calculate the total

Press Enter. Excel adds the values in H2:H25 for rows where column E equals 1000 and column G equals 9.

Use SUMIFS to Apply Both Conditions
Keep the ranges aligned: The sum range and both criteria ranges must cover the same number of rows and correspond to the same worksheet rows.
Sum with two conditions

Apply the Same SUMIFS Formula in WPS Spreadsheet

Use SUMIFS in WPS Spreadsheet to total column H when the corresponding cells in columns E and G meet both conditions.

  1. 1. Open the workbook: Open WPS Spreadsheet and use File > Open to select your workbook.
  2. 2. Choose a result cell: Click an empty cell where you want to display the total.
  3. 3. Enter the formula: Type =SUMIFS(H2:H25,E2:E25,1000,G2:G25,9) in the cell or formula bar.
  4. 4. Calculate and save: Press Enter to calculate the total, then use File > Save to save the workbook.
Sum values using multiple conditions in one formula.Open and edit Microsoft Excel XLSX and XLS files.Use a familiar spreadsheet interface to enter and check formulas.
microsoft office alternative - wps office

Frequently Asked Questions

Does SUMIFS require both conditions to match?

Yes. In =SUMIFS(H2:H25,E2:E25,1000,G2:G25,9), a row contributes to the total only if E equals 1000 and G equals 9.

How do I include more rows in the total?

Edit the formula in the formula bar and extend all three ranges consistently. For example, replace each row 25 endpoint with row 100.

Can I refer to cells for the criteria instead of typing numbers?

Yes. If J2 contains 1000 and K2 contains 9, use =SUMIFS(H2:H25,E2:E25,J2,G2:G25,K2).

Why does my SUMPRODUCT formula return an error?

Check H2:H25 for text or error values and make sure E2:E25, G2:G25, and H2:H25 cover matching rows. Alternatively, use the SUMIFS formula.