logo
search
Function Problems

How to Use SUMIFS Formula for Debit or Credit Transactions in Excel

John WilsonJohn Wilson Sep 27, 2026 869 views

Question details

The user needs to calculate the total transaction amount for a selected account, but only when the transaction type is specifically labeled as 'Debit' or 'Credit'.

How to Use SUMIFS Formula for Debit or Credit Transactions in Excel
Product
Excel
Device & OS
not provided
Scenario
Filtering and summing financial ledger data conditionally based on multiple specific text criteria within a single column.
Observed behavior
The user requires an accurate formula syntax to evaluate multiple criteria using OR logic ('Debit' OR 'Credit') and optionally output a blank cell instead of a zero if there are no matching results.
Before you start

Ensure that the ranges for your amounts, account criteria, and transaction types contain the exact same number of rows to prevent #VALUE! errors in your formulas.

Solution 1Recommended

Use SUMIFS with an Array of Criteria

Combine the SUM and SUMIFS functions using an array constant to calculate totals for multiple conditions like 'Debit' or 'Credit' simultaneously.

The standard SUMIFS function usually operates with AND logic. By wrapping SUMIFS inside a SUM function and passing an array of criteria, you can force it to evaluate using OR logic, summing amounts for both transaction types at once.

1
Select the target cell

Click on the cell where you want the calculated total amount to be displayed.

2
Enter the nested formula

Type the formula: =SUM(SUMIFS($U$60:$U$600,$R$60:$R$600,G9,$V$60:$V$600,{"Debit","Credit"}))

3
Apply the calculation

Press Enter to execute the formula. It will sum all amounts in column U where column R matches the value in G9, and column V is either 'Debit' or 'Credit'.

Use SUMIFS with an Array of Criteria
Formula Breakdown: The array {"Debit","Credit"} calculates two separate totals (one for Debit, one for Credit), and the outer SUM function adds those two totals together.
Efficient Financial Analysis

Manage Your Debit and Credit Ledgers Seamlessly with WPS Spreadsheet

WPS Spreadsheet fully supports advanced array formulas, SUMIFS, and SUMPRODUCT, allowing you to manage your financial records and calculate transactions with ease. The interface is highly intuitive, making data analysis efficient for both beginners and experts.

  1. 1. Open your ledger: Launch WPS Spreadsheet and open your financial workbook containing the account and transaction data.
  2. 2. Select the target cell: Click on the specific cell where you wish to calculate the filtered account total.
  3. 3. Input the financial formula: Type in your chosen =SUM(SUMIFS(...)) formula exactly as you would in Microsoft Excel.
  4. 4. Calculate instantly: Press Enter to instantly process the data and display your accurate debit and credit totals.
100% compatible with Microsoft Excel formulas, functions, and formatting.Free, lightweight, and fast installation on Windows, Mac, and Linux.Built-in advanced data analysis tools and customizable financial tracking templates.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my SUMIFS formula return a #VALUE! error?

This error most commonly occurs when your criteria ranges and sum range do not contain the same number of rows and columns. Ensure that ranges like $U$60:$U$600 and $R$60:$R$600 align perfectly in their start and end points.

Can I use the standard SUMIF function instead of SUMIFS for this?

The standard SUMIF function is designed to handle only a single condition. Because you need to check both the account identifier and multiple transaction types ('Debit' or 'Credit'), you must use SUMIFS or SUMPRODUCT.

Are the text criteria in the SUMIFS formula case-sensitive?

No, functions like SUMIFS and SUMPRODUCT in spreadsheets are not case-sensitive. The text strings 'Debit', 'DEBIT', and 'debit' will all be evaluated identically and included in the total.