Formula Errors

Use SUMIF for Noncontiguous Ranges in WPS Spreadsheets

Aamir Naveed AkramAamir Naveed Akram Nov 14, 2026 870 views

Question details

Sum values matching a February criterion across two noncontiguous ranges without including the formula cell.

Use SUMIF for Noncontiguous Ranges Without a Circular Reference
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.
Before you start

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.

Solution 1Recommended

Add Two SUMIF Functions to Exclude C7

Use one SUMIF for each block of rows, then add the results without including the formula cell.

1
Select the formula cell

Open the worksheet and click cell C7.

2
Enter the formula

Type =SUMIF(A2:A6,A7,C2:C6)+SUMIF(A8:A10,A7,C8:C10) in C7 or the formula bar, then press Enter.

3
Check the result

Compare the result in C7 with the values in C2:C6 and C8:C10 whose corresponding column A entries match A7.

Add Two SUMIF Functions to Exclude C7
Keep the ranges aligned: Each SUMIF criteria range must correspond to its sum range: A2:A6 with C2:C6, and A8:A10 with C8:C10. Avoid using C:C as the sum range while the formula is in C7.
WPS Spreadsheets

Calculate the SUMIF Total in WPS Spreadsheets

Use WPS Spreadsheets to add two SUMIF results and exclude the cell containing your formula.

  1. 1. Open the workbook: Launch WPS Office, open Spreadsheets, and choose Open to select your workbook.
  2. 2. Check the criterion: Click A7 and confirm it contains the label to match, such as February.
  3. 3. Enter the formula: Click C7 and enter =SUMIF(A2:A6,A7,C2:C6)+SUMIF(A8:A10,A7,C8:C10), then press Enter.
  4. 4. Save the workbook: Check the total in C7, then choose File > Save to save your changes.
Sum matching values across separate row ranges without including C7Open and edit Microsoft Excel XLSX and XLS filesReview and edit formulas using the formula bar
microsoft office alternative - wps office

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.