Function Problems

How to Calculate Total Payments by Customer or Account in Excel

Nimra MalikNimra Malik Nov 11, 2026 868 views

Question details

The user needs to calculate the total payment amounts for specific combinations of customers and accounts, ensuring all transactions are accounted for even if there is only one transaction per customer.

How to Calculate Total Payments by Customer or Account in Excel
Product
Excel
Device & OS
not provided
Scenario
Summarizing financial data or sales records to find aggregated totals based on multiple criteria, specifically the customer name and the account ID.
Observed behavior
The goal is to generate accurate sum totals for each matching customer-account combination using functions or data summarization tools.
Before you start

Ensure your dataset is organized in clear columns with headers (e.g., Customer, Account, Payment Amount) and verify that there are no merged cells or blank rows interrupting your data range.

Solution 1Recommended

Use the SUMIFS Function to Calculate Totals

The SUMIFS function is the most direct way to sum values based on multiple conditions, such as matching both the account and the customer name.

SUMIFS allows you to specify a range to sum, followed by multiple criteria ranges and the specific criteria you want to match. This guarantees that only rows matching both the specified customer and account are aggregated.

1
Select the target cell

Click on the cell where you want the total payment amount to appear (e.g., cell F2).

2
Enter the SUMIFS formula

Type the formula =SUMIFS($E$2:$E$6,$D$2:$D$6,D2,$C$2:$C$6,C2). In this example, column E contains the payment amounts, column D contains the accounts, and column C contains the customer names.

3
Apply to the remaining rows

Press Enter to calculate the first total. Then, click the small square at the bottom-right corner of the cell (fill handle) and drag it down to apply the formula to the rest of the rows.

Use the SUMIFS Function to Calculate Totals
Absolute References: Using dollar signs ($) locks the data ranges so they don't shift when you drag the formula down to other cells.
Analyze Data Easily

Calculate Complex Totals Effortlessly in WPS Spreadsheet

WPS Spreadsheet provides full support for advanced functions like SUMIFS, COUNTIFS, and PivotTables, allowing you to summarize and analyze financial data accurately and efficiently.

  1. 1. Open your data file: Launch WPS Spreadsheet and open the workbook containing your customer and account payment data.
  2. 2. Use advanced formulas: Navigate to the Formula tab to easily insert SUMIFS and COUNTIFS functions using the intuitive dialog box prompts.
  3. 3. Summarize with PivotTables: Alternatively, go to the Insert tab and click PivotTable to quickly group and calculate payment totals without writing code.
Fully compatible with Microsoft Excel formulas, ensuring your SUMIFS and COUNTIFS work perfectly without modification.Seamless support for Microsoft Excel PivotTable structures and source data.Built-in smart formula assistance to help you write complex IF statements without syntax errors.Free, lightweight, and incredibly fast, even when processing large financial datasets.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my SUMIFS formula returning a #VALUE! error?

A #VALUE! error in a SUMIFS formula usually occurs when the criteria ranges are not exactly the same size as the sum range. For example, if your sum range is E2:E6 but your criteria range is D2:D7, the formula will fail. Ensure all ranges in the formula correspond to the exact same row numbers.

Can I sum payments based on more than two conditions?

Yes, the SUMIFS function can handle up to 127 range/criteria pairs. You can easily add more conditions to your formula, such as specifying a date range, a specific region, or a particular transaction type by simply appending them after your first two conditions.

How do I handle empty cells in my criteria ranges when using SUMIFS?

If you specifically want to sum rows where a criteria column is blank, you can use "=" as your criteria. However, to prevent calculation issues, it is highly recommended to clean your dataset and remove unintended blank rows before calculating aggregated totals.