Function Problems

Create a Dynamic Array Summary by Name in Excel

Khadija KhanKhadija Khan Dec 2, 2026 868 views

Question details

Create a dynamic summary that totals amounts for each name and sorts the totals in descending order.

Create a Dynamic Array Summary by Name in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Create a source table

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.

2
Check the column names

Make sure the table headers are Company Name and Total outstanding amount. If your headers differ, replace the corresponding structured references in the formula.

3
Enter 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))

4
Check the spilled results

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 and sort names with a dynamic array formula
Blank names: A blank entry in the name column can appear as a separate group. Remove or filter out blank names if they should not be included.
Summarize spreadsheet data

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. 1. Open the workbook: In WPS Spreadsheets, choose Open and select the Excel workbook containing the names and amounts.
  2. 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. 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. 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.
Summarize repeated names and sort totals in a spreadsheetOpen and save Microsoft Excel .xlsx filesUse a familiar spreadsheet interfaceTry a PivotTable when the dynamic formula is unavailable
QA img-9

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.