Dynamic Array Alternatives to SUMIF and SUMIFS in Excel
Question details
The user needs a dynamic array formula alternative to SUMIF and SUMIFS to summarize large datasets by matching rows automatically spilling the results, avoiding manual copying and sluggish workbook performance.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Summarizing a large dataset with conditional sums where dragging SUMIFS formulas across thousands of rows causes workbook calculation lag.
- Observed behavior
- A large spreadsheet workbook becomes slow and laggy when relying on traditional SUMIF or SUMIFS formulas that are copied down rows.
Ensure your spreadsheet software supports dynamic array formulas, which are available in Microsoft 365, Excel 2021, and modern versions of WPS Office. If you are using an older version, these functions will return a #NAME? error.
Use a Combination of BYROW, UNIQUE, and FILTER Functions
This method replaces traditional SUMIFS with a LAMBDA-based dynamic array formula that evaluates the unique criteria once and spills the sums automatically without dragging.
Traditional SUMIFS formulas slow down workbooks because they recalculate the entire criteria range for every single cell where the formula exists. By leveraging dynamic arrays, you can evaluate the logic dynamically and generate a 'spill' range that calculates much faster.
Identify the column containing your criteria. Use the UNIQUE function to extract an unrepeated list. For example, enter =UNIQUE(A2:A1000) in a blank cell to spill the unique categories.
To sum the values for a specific unique item, you can use SUM(FILTER(values_range, criteria_range=item)). For example: =SUM(FILTER(B2:B1000, A2:A1000="Category1")).
Wrap the logic in BYROW so it iterates over the unique array automatically. Enter this single formula into the top cell: =BYROW(UNIQUE(A2:A1000), LAMBDA(row, SUM(FILTER(B2:B1000, A2:A1000=row)))). Press Enter to see the sums spill downwards adjacent to your unique items.

Use Power Query to Group and Summarize Data
For exceptionally massive datasets where even dynamic array formulas cause lag, Power Query provides a robust, formula-free aggregation method.
Use WPS Spreadsheet to Handle Large Datasets with Dynamic Arrays
WPS Office Spreadsheet is optimized for managing large datasets without lag. It fully supports modern dynamic array functions like UNIQUE, FILTER, and BYROW, allowing you to summarize data effortlessly while maintaining full compatibility with Microsoft Excel files.
- 1. Open Your Workbook in WPS Spreadsheet: Download and launch WPS Office, then open your existing large dataset (.xlsx file) in the Spreadsheet application.
- 2. Enter the Dynamic Formula: Click on the empty cell where you want your summary to start. Enter your combined =BYROW(UNIQUE(...)) dynamic formula.
- 3. Let the Array Spill: Press Enter. WPS Spreadsheet will calculate the array logic and instantly spill the summarized sums into the neighboring blank cells down the column.

Frequently Asked Questions
Why is SUMIFS slowing down my large spreadsheet?
When copied down thousands of rows, SUMIFS evaluates the entire specified criteria range for every single cell it resides in. This results in millions of redundant calculation steps, causing memory consumption and severe performance lag.
Do dynamic array formulas work in older versions of Excel or WPS?
No, dynamic array functions (such as UNIQUE, FILTER, BYROW, and LAMBDA) are only available in modern spreadsheet engines like Microsoft 365, Excel 2021, and the latest versions of WPS Office. Opening a workbook with these formulas in older versions will yield a #NAME? or _xlfn prefix error.
Are Pivot Tables a better alternative to dynamic arrays for summing?
Pivot Tables are generally the most highly optimized tool for aggregating massive datasets and will typically out-perform complex formulas. However, dynamic arrays are preferred when you need the summarized data to update instantly without requiring a manual 'Refresh' click.
What is a 'Spill' range in spreadsheet terminology?
A spill range occurs when a single formula produces an array of multiple results. Instead of crowding into one cell, the spreadsheet engine automatically drops (or 'spills') those results into adjacent empty cells down the column or across the row.




