Fix SUMIF Cell Reference Criteria in Excel and WPS Spreadsheets
Question details
The user needs a SUMIF formula to match a payment number referenced from a cell instead of typed directly into the formula.

- Product
- Microsoft Excel or WPS Spreadsheets
- Device & OS
- not provided
- Scenario
- A spreadsheet uses a payment number as the SUMIF criterion to total corresponding interest amounts.
- Observed behavior
- The formula works with a typed payment number but fails when the criterion references another cell.
Identify the payment-number range, the cell containing the criterion, and the corresponding interest range. Compare the working and nonworking formulas in the formula bar, including their sheet references.
Check the SUMIF references and matching ranges
Use this solution to correct the formula structure and ensure each payment number lines up with its interest amount.
Select the result cell and enter a formula such as =SUMIF(A2:A100,B2,C2:C100), where column A contains payment numbers, B2 contains the criterion, and column C contains interest amounts.
In the formula bar, make sure the criteria range and sum range cover corresponding rows and have the same dimensions, such as A2:A100 and C2:C100.
Check the formula bar for the correct sheet names. If the formula will be copied and the criterion must stay in B2, change B2 to $B$2.
Click B2 and confirm it contains the intended payment number. Compare the result with the formula that uses the typed number.

Clean and compare payment-number values
Use this solution if the references are correct but the criterion or payment numbers contain text, spaces, or inconsistent data.
Fix SUMIF Criteria in WPS Spreadsheets
Open your workbook in WPS Spreadsheets, check the criterion cell and matching ranges, and update the SUMIF formula to use the correct reference.
- 1. Open the workbook: Open WPS Spreadsheets and use File > Open to select your workbook.
- 2. Check the criterion: Click the cell containing the payment number, such as B2, and inspect its value in the formula bar.
- 3. Edit the formula: Select the result cell and enter =SUMIF(A2:A100,B2,C2:C100), adjusting the ranges to match your worksheet.
- 4. Check the result: Press Enter and compare the total with the expected amount. If it is incorrect, inspect the criterion and payment values for spaces or inconsistent data types.

Frequently Asked Questions
How do I use a cell as the SUMIF criterion?
Enter the cell reference as the second argument, for example =SUMIF(A2:A100,B2,C2:C100). This matches values in column A against B2 and sums the corresponding values in column C.
Why does SUMIF return zero when the payment number looks correct?
Check the criterion and payment-number cells for extra spaces, inconsistent text and number values, or incorrect sheet references. Also confirm that the interest range contains numeric amounts.
How do I keep the criterion cell fixed when copying the formula?
Use an absolute reference such as $B$2 in the formula bar: =SUMIF(A2:A100,$B$2,C2:C100). The criterion will continue to reference B2 when the formula is copied.
How do I use a cell reference with a greater-than condition?
Join the operator and the reference with an ampersand, as in =SUMIF(A2:A100,">"&B2,C2:C100).




