Function Problems

How to Sum Amounts Across Multiple Category Columns in Excel

Bushra ParveenBushra Parveen Nov 10, 2026 869 views

Question details

The user needs to calculate the total funding for a specific research category when the text categories and their associated dollar amounts are scattered across multiple, non-contiguous columns.

How to Sum Amounts Across Multiple Category Columns in Excel
Product
Excel
Device & OS
not provided
Scenario
Aggregating financial or research data where category names and dollar amounts alternate across several columns within a dataset.
Observed behavior
A conditional sum operation is required to evaluate multiple column ranges simultaneously in order to output a combined total for a single category.
Before you start

Identify the exact cell ranges for your category labels and your numeric amounts, ensuring both ranges are of the exact same size and shape before applying the array formula.

Solution 1Recommended

Use the SUM and IF Array Formula

Combine the SUM and IF functions in an array formula to evaluate categories across a multi-column range and sum their corresponding amounts.

When data isn't organized in a standard tabular format (single criteria column and single value column), traditional functions like SUMIF may fail. By nesting an IF statement inside a SUM function, you can create an array formula that checks a multi-column block of categories and extracts the matching values from an adjacent multi-column block.

1
Select the destination cell

Click on the cell where you want the final calculated total to appear, such as cell B12, where your target category is defined.

2
Enter the array formula

Type the formula =SUM(IF($B$2:$F$9=B12,$C$2:$G$9)) into the formula bar. Replace $B$2:$F$9 with the range containing your category labels, B12 with your specific category criteria, and $C$2:$G$9 with the range containing the dollar amounts.

3
Confirm the formula

In legacy versions like Excel 2013, you must confirm the formula by pressing Ctrl+Shift+Enter simultaneously. In newer Excel versions (like Excel 365), a standard Enter is usually sufficient to calculate the array.

Use the SUM and IF Array Formula
Array Formulas in Older Excel Versions: When using Ctrl+Shift+Enter, Excel will automatically enclose your formula in curly braces {}. Do not type these braces manually, or the formula will be treated as text.
Advanced Spreadsheet Functions

Easily Calculate Multi-Column Data with WPS Spreadsheet

WPS Spreadsheet fully supports advanced array formulas, making it simple to conditionally sum complex, multi-column datasets. It provides a lightweight, free, and highly efficient environment for your data analysis needs.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing your scattered category and amount data.
  2. 2. Select the total cell: Click the cell where you want the sum to be calculated.
  3. 3. Input the array formula: Type your =SUM(IF(...)) formula directly into the formula bar.
  4. 4. Apply the calculation: Press Enter (or Ctrl+Shift+Enter for strict array evaluation) to instantly view your accurately calculated multi-column totals.
Fully compatible with Microsoft Excel formulas, including array operations like SUM and IFSeamlessly processes large datasets spread across multiple columnsLightweight and free to use for daily data analysis and reportingClean, tabbed interface for managing multiple workbooks efficiently
microsoft office alternative - wps office

Frequently Asked Questions

Can I use the SUMIFS function instead of an array formula?

The standard SUMIFS function generally requires the criteria range and sum range to be single columns or rows. If your criteria and sum data span multiple columns (e.g., criteria in B, D, F and sums in C, E, G), a standard SUMIFS will not work correctly, and an array formula like SUM(IF()) or SUMPRODUCT is required.

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

This usually happens if the criteria range and the sum range in your array formula are not the exact same size. For the SUM(IF()) formula to work, the dimensions of the label range (e.g., $B$2:$F$9) and the amount range (e.g., $C$2:$G$9) must match perfectly.

How can I sum values based on criteria across multiple sheets?

To conditionally sum values across multiple worksheets, you can combine the SUMPRODUCT, SUMIF, and INDIRECT functions. This allows you to evaluate criteria dynamically across a list of sheet names.