Use SUMIFS in Excel to Sum Values Based on Two Conditions
Question details
Sum values in column H only when the corresponding values in column E equal 1000 and those in column G equal 9.

- 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.
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.
Use SUMIFS to Apply Both Conditions
Use SUMIFS to add values in column H only when both criteria match on the same row.
Click an empty cell outside the data range where you want the total to appear.
Type =SUMIFS(H2:H25,E2:E25,1000,G2:G25,9) in the selected cell or formula bar.
Press Enter. Excel adds the values in H2:H25 for rows where column E equals 1000 and column G equals 9.

Use SUMPRODUCT as an Alternative
Use SUMPRODUCT to multiply the two matching tests by the values to be summed.
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. Open the workbook: Open WPS Spreadsheet and use File > Open to select your workbook.
- 2. Choose a result cell: Click an empty cell where you want to display the total.
- 3. Enter the formula: Type =SUMIFS(H2:H25,E2:E25,1000,G2:G25,9) in the cell or formula bar.
- 4. Calculate and save: Press Enter to calculate the total, then use File > Save to save the workbook.

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.




