How to Use Excel SUMIF Formula to Total Values by Payment Type
Question details
The user needs to calculate the total transaction amounts filtered by specific payment methods using the Excel SUMIF formula.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Aggregating financial data or transaction logs to find the total sum of amounts for a specific payment category, such as credit card or cash.
- Observed behavior
- The user wants to successfully apply a conditional sum using either a hardcoded text criterion or a dynamic cell reference.
Ensure your transaction data is organized in clean columns, with one dedicated column for the payment types and another containing numerical transaction amounts.
Calculate Totals Using a Direct Text Criterion
Directly input the specific payment type (like "credit" or "cash") into the formula to quickly get the sum for that category.
This method is best when you only need to calculate the sum for a single, unchanging payment type and do not expect the condition to vary frequently.
Click on the empty cell where you want the calculated total to appear.
Type `=SUMIF(` to initiate the function.
Highlight the column or range of cells containing your payment types (e.g., A2:A100), then type a comma.
Type your desired payment type wrapped in double quotation marks, such as `"credit"`, followed by a comma.
Highlight the column containing the transaction amounts (e.g., B2:B100), close the parenthesis with `)`, and press Enter. Your formula should look like `=SUMIF(A2:A100, "credit", B2:B100)`.

Calculate Totals Using a Dynamic Cell Reference
Use a cell reference for the payment type criterion to make your formula dynamic, allowing you to change the target payment type without editing the formula.
Easily Calculate Conditional Sums with WPS Spreadsheet
WPS Office Spreadsheet provides full support for the SUMIF function and hundreds of other standard data analysis formulas. You can effortlessly sum your transaction data by payment types using the exact same syntax you are already familiar with.
- 1. Open your data file: Launch WPS Spreadsheet and open the workbook containing your transaction data.
- 2. Start the formula: Select an empty cell for your total and type `=SUMIF(`.
- 3. Select the ranges: Highlight your payment type column, input your criterion (e.g., cell E1), and then select your transaction amount column.
- 4. Calculate the result: Press Enter to instantly view your aggregated total for the specified payment type.

Frequently Asked Questions
Why is my SUMIF formula returning zero even though the payment types exist?
This usually happens if the payment type text in your criterion doesn't exactly match the text in your data range (such as having hidden trailing spaces), or if the amount range contains numbers formatted as text. Use the TRIM function on your data to remove accidental spaces, and ensure your amount column is formatted as Numbers.
Can I use SUMIF to total amounts for multiple payment types at the same time?
The SUMIF function only supports a single condition. To sum amounts for multiple payment types (e.g., 'credit' OR 'cash' in the same total), you can add two SUMIF functions together. For example: `=SUMIF(A:A, "credit", B:B) + SUMIF(A:A, "cash", B:B)`.
What is the main difference between SUMIF and SUMIFS?
SUMIF is designed to test a single condition, like looking only at the payment type. SUMIFS allows you to test multiple conditions across different ranges simultaneously. For example, you would use SUMIFS if you need to find the total where the payment type is 'credit' AND the transaction date is in 'January'.




