Function Problems

How to Create Subtotals from Multiple Columns in Excel

Rana GarciaRana Garcia Oct 26, 2026 868 views

Question details

The user needs to consolidate and calculate subtotals for accounts that appear across multiple different columns.

How to Calculate Subtotals from Multiple Account Columns in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Managing financial or accounting data where the same account entries and their corresponding amounts are distributed across two separate column pairs (e.g., Account A/Amount A and Account B/Amount B).
Observed behavior
The goal is to generate a consolidated account list and a unified total amount without needing to manually stack or merge the original columns into one tall list.
Before you start

Ensure your account columns have exact matching names without extra trailing spaces, as the SUMIF function requires exact text matches to calculate correctly.

Solution 1Recommended

Use SUMIF Function to Add Multiple Columns

Combine multiple SUMIF functions to calculate totals from separate column ranges based on a consolidated account list.

The SUMIF function allows you to add values based on a specific criterion. By adding two SUMIF formulas together, you can evaluate two separate account columns and sum their respective amounts seamlessly.

1
Create a consolidated list

Extract all unique account names from both 'Account A' and 'Account B' columns and paste them into a new column (e.g., Column E).

2
Enter the first SUMIF formula

In the cell next to your first consolidated account (e.g., F2), type =SUMIF($A$2:$A$5, E2, $B$2:$B$5). This totals the amounts from the first account column.

3
Add the second SUMIF formula

Append the second range evaluation to the existing formula by adding a plus sign: +SUMIF($C$2:$C$5, E2, $D$2:$D$5).

4
Apply the formula

Press Enter to calculate the total for the first account, then drag the fill handle down to apply this combined formula to the rest of your consolidated account list.

Use SUMIF Function to Add Multiple Columns
Pro Tip: Using absolute references (like $A$2:$A$5) ensures your data ranges don't shift down when you drag the formula to fill the rest of the column.
Free Spreadsheet Software

Consolidate Data Easily with WPS Spreadsheet

WPS Spreadsheet provides full support for advanced formulas like SUMIF, allowing you to quickly consolidate multi-column data. It is a powerful, free alternative to Excel with a familiar interface.

  1. 1. Open your data file: Launch WPS Spreadsheet and open your financial or accounting document.
  2. 2. Create a unique account list: Copy all account names from your multiple columns, paste them in a new column, and use the 'Remove Duplicates' feature under the Data tab.
  3. 3. Input the combined formula: Use the combined =SUMIF()+SUMIF() formula next to your unique list to calculate the subtotals.
  4. 4. Fill the column: Drag the fill handle downward to apply the subtotals across all accounts instantly.
Fully compatible with Microsoft Excel formulas and .xlsx files.Built-in tools for extracting unique values and managing complex data.Lightweight and fast, even when handling large financial datasets.Completely free to use with a familiar, easy-to-navigate tabbed user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my SUMIF formula returning zero even though the account exists?

This usually happens due to mismatched text, such as extra trailing spaces or slight spelling differences between the columns. Use the TRIM function on your account columns to remove invisible spaces, or ensure the text matches exactly.

Can I use SUMIFS instead of SUMIF for multiple columns?

The SUMIFS function is designed to evaluate multiple conditions within the same range, not across different column sets. For distinct column pairs (Account A/Amount A and Account B/Amount B), adding separate SUMIF functions together is the correct approach.

How do I easily get a list of unique accounts from two different columns?

You can copy the data from both account columns, paste them one under the other in a new temporary column, and then use the 'Remove Duplicates' feature found in the Data tab to get a clean, consolidated list.