How to Calculate an Outstanding Balance with SUMIF in WPS Office Spreadsheets
Question details
The user needs to calculate an outstanding balance by subtracting rows marked Y as paid from a total budget using the SUMIF function.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- A budget worksheet has amounts in column B, status markers Y or N in column C, and a total budget in B32. The goal is to return the remaining unpaid amount in C32.
- Observed behavior
- The user wants the formula to identify paid rows and deduct them from the overall total, or directly sum only the unpaid rows.
Confirm that the status column uses consistent values such as Y for paid and N for unpaid, and verify that the total budget is located in B32 before entering the formula.
Use SUMIF to Subtract Paid Amounts from the Total Budget
Use this solution when you have a total budget and want to deduct every row marked Y as paid.
This formula sums the amounts in B2:B30 where C2:C30 equals Y, then subtracts that paid total from the budget in B32.
In your WPS Office Spreadsheets worksheet, click cell C32 where you want the outstanding balance to appear.
Type =B32-SUMIF(C2:C30,"Y",B2:B30) and press Enter.
Check that the value matches the total budget minus all rows marked Y in C2:C30.

Sum Unpaid Rows Directly with SUMIF and N
Use this solution when every status cell contains either Y or N and you prefer a single direct SUMIF formula.
Calculate Outstanding Balances with SUMIF in WPS Office
Open your workbook in WPS Office Spreadsheets and use the SUMIF formula to total paid or unpaid rows. WPS Office supports the same workbook structure and formulas, so you can apply this Excel-compatible calculation without changing your workflow.
- 1. Open your budget workbook: Launch WPS Office Spreadsheets and open the workbook that contains the budget and payment status data.
- 2. Click cell C32: Select cell C32 as the location for the outstanding balance result.
- 3. Enter the SUMIF formula: Type =B32-SUMIF(C2:C30,"Y",B2:B30) in cell C32.
- 4. Review the result: Press Enter and confirm that the returned amount is the unpaid balance.

Frequently Asked Questions
Can I use SUMIF to subtract paid amounts if my status column contains Y and blank cells?
Yes, use =B32-SUMIF(C2:C30,"Y",B2:B30). Blank cells are ignored by SUMIF, so they are not deducted from the total.
What is the direct formula when every row is marked Y or N?
Use =SUMIF(C2:C30,"N",B2:B30) to sum only the unpaid rows directly.
Does the formula work the same in WPS Office Spreadsheets and Excel?
Yes, WPS Office Spreadsheets supports SUMIF with the same syntax and workbook references, so the formula works the same way.
How can I calculate an outstanding balance when status values are not exactly Y or N?
Use =SUMIF(C2:C30,"<>Y",B2:B30) to sum everything not equal to Y, but first confirm that blanks or other statuses should be treated as unpaid.
What should I check if my SUMIF result is wrong?
Check that the status range C2:C30 and sum range B2:B30 have the same size, and make sure the Y and N values do not contain leading or trailing spaces.




