Use SUMIF for Noncontiguous Ranges in WPS Spreadsheets
Question details
Sum values matching a February criterion across two noncontiguous ranges without including the formula cell.

- Product
- WPS Spreadsheets or Microsoft Excel
- Device & OS
- not provided
- Scenario
- A formula in C7 needs to sum matching values from C2:C6 and C8:C10 using the criterion in A7.
- Observed behavior
- Including C7 in the sum range can create a circular reference because C7 contains the formula.
Check that A7 contains the February criterion and that column A contains the labels to match. Confirm that the values to sum are in C2:C6 and C8:C10.
Add Two SUMIF Functions to Exclude C7
Use one SUMIF for each block of rows, then add the results without including the formula cell.
Open the worksheet and click cell C7.
Type =SUMIF(A2:A6,A7,C2:C6)+SUMIF(A8:A10,A7,C8:C10) in C7 or the formula bar, then press Enter.
Compare the result in C7 with the values in C2:C6 and C8:C10 whose corresponding column A entries match A7.

Calculate the SUMIF Total in WPS Spreadsheets
Use WPS Spreadsheets to add two SUMIF results and exclude the cell containing your formula.
- 1. Open the workbook: Launch WPS Office, open Spreadsheets, and choose Open to select your workbook.
- 2. Check the criterion: Click A7 and confirm it contains the label to match, such as February.
- 3. Enter the formula: Click C7 and enter =SUMIF(A2:A6,A7,C2:C6)+SUMIF(A8:A10,A7,C8:C10), then press Enter.
- 4. Save the workbook: Check the total in C7, then choose File > Save to save your changes.

Frequently Asked Questions
Why does using C:C create a circular reference?
If the formula is in C7, using C:C as the SUMIF sum range includes the formula cell itself. Use C2:C6 and C8:C10 in separate SUMIF functions instead.
What does A7 represent in the formula?
A7 is the criterion cell. SUMIF compares its value with the labels in A2:A6 and A8:A10, then sums the corresponding values in column C.
Can I use the same formula in Microsoft Excel?
Yes. Enter =SUMIF(A2:A6,A7,C2:C6)+SUMIF(A8:A10,A7,C8:C10) in C7 in Excel. Adjust the ranges if your data is in different rows.
How do I include another block of rows?
Add another SUMIF term to the formula, such as +SUMIF(A12:A15,A7,C12:C15). Make sure the criteria and sum ranges cover corresponding rows and exclude the formula cell.




