Create a Dynamic Array Summary by Name in Excel
Question details
Create a dynamic summary that totals amounts for each name and sorts the totals in descending order.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains repeated company names and outstanding amounts that need to be summarized automatically.
- Observed behavior
- The desired result is a two-column spilled array with one row per unique name, ordered by total amount from highest to lowest.
Check that the name and amount columns have headers and that the amounts are numeric. Use a version of Excel that supports LET, UNIQUE, and dynamic arrays, and leave enough empty cells for the results to spill.
Summarize and sort names with a dynamic array formula
Use this formula when you want a two-column summary that updates as the source table changes.
Select the data, choose Insert > Table, and confirm that the table has headers. On the Table Design tab, name the table Table1, or adjust the formula to match your table name.
Make sure the table headers are Company Name and Total outstanding amount. If your headers differ, replace the corresponding structured references in the formula.
Select an empty cell outside the table and enter: =LET(names,UNIQUE(Table1[Company Name]),totals,SUMIFS(Table1[Total outstanding amount],Table1[Company Name],names),summary,CHOOSE({1,2},names,totals),SORT(summary,2,-1))
Press Enter to spill the names and totals into two columns. The second column is sorted from highest to lowest; clear any cells blocking the spill area if Excel displays #SPILL!.

Summarize names with a PivotTable
Use a PivotTable if dynamic array functions are unavailable or you prefer a menu-based summary.
Build a name-and-total summary in WPS Spreadsheets
Open the workbook in WPS Spreadsheets and try the dynamic array formula to group names and sort their totals. Function and structured-reference support can vary by version; use a PivotTable if the formula is not supported.
- 1. Open the workbook: In WPS Spreadsheets, choose Open and select the Excel workbook containing the names and amounts.
- 2. Check the source table: Select the source data and verify that the table is named Table1 and has Company Name and Total outstanding amount headers. Adjust the references in the formula if your table or headers have different names.
- 3. Enter the summary formula: In an empty cell outside the table, enter =LET(names,UNIQUE(Table1[Company Name]),totals,SUMIFS(Table1[Total outstanding amount],Table1[Company Name],names),summary,CHOOSE({1,2},names,totals),SORT(summary,2,-1)) and press Enter.
- 4. Check the result or use a PivotTable: Confirm that the two-column result spills and sorts by total. If your WPS version does not support the formula, select the data and use Insert > PivotTable to group names and sum amounts instead.

Frequently Asked Questions
Why does the formula show #SPILL!?
The result needs empty cells below and to the right of the formula. Clear any cells blocking that area and enter the formula outside an Excel table.
Will the summary include new rows?
Yes, when new rows are added to the source Excel table, its structured references expand and the dynamic formula recalculates. A PivotTable generally needs to be refreshed instead.
How do I use different column names?
Replace Table1[Company Name] and Table1[Total outstanding amount] in the formula with the actual table and header names shown in your workbook.
Why are some amounts not included in the totals?
Check whether the amount cells contain numbers rather than text. Convert text-formatted amounts to numbers in the source column, then check the summary again.




