logo
search
Calculation Issues

How to Create Dynamic Account Balances from Excel Transactions

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user needs to extract a unique list of accounts from "From" and "To" transaction columns to calculate balances without relying on Power Query.

Product
Excel, Google Sheets
Device & OS
not provided
Scenario
Creating an automated, dynamic list of accounts from transaction records to compute running or final balances.
Observed behavior
The user is looking for an automated formula-based approach that accommodates modern Excel, handles table limitations where spill formulas aren't allowed, and maintains compatibility with older versions or Google Sheets.
Before you start

Ensure your transaction data is formatted as an Excel Table (e.g., named "Table1") to allow dynamic range references, and verify if your spreadsheet software supports dynamic array functions like UNIQUE and VSTACK.

Solution 1Recommended

Use UNIQUE and VSTACK Formulas for Dynamic Arrays

For modern Excel versions supporting dynamic arrays, you can instantly extract a unique list of accounts from multiple columns using a single formula.

1
Convert Data to Table

Select your transaction data range and press Ctrl + T to convert it into an Excel Table. Ensure it is named Table1 in the Table Design tab.

2
Enter the Formula

In a new blank cell outside of the table, type the following formula: =UNIQUE(VSTACK(Table1[From],Table1[To]))

3
Generate the Dynamic List

Press Enter. The formula will automatically spill downwards, creating a complete list of unique accounts from both the From and To columns.

Spill Array Benefit: This method is fully dynamic and will automatically update your unique account list as new transactions are added to Table1.

Use WPS Spreadsheet for Seamless Dynamic Arrays

WPS Spreadsheet fully supports modern dynamic array functions like UNIQUE and VSTACK, making it incredibly easy to extract unique account balances from transaction data without needing complex workarounds.

  1. 1. Open your Workbook: Launch WPS Spreadsheet and open your transaction workbook.
  2. 2. Format as Table: Select your transaction data and press Ctrl + T to format it as a table.
  3. 3. Input the Formula: Click an empty cell and type =UNIQUE(VSTACK(Table1[From],Table1[To])).
  4. 4. Get the Results: Press Enter to instantly generate a dynamic, spill-enabled list of your unique accounts.
Fully compatible with Microsoft Excel formulas and the .xlsx format.Natively supports dynamic array functions including UNIQUE, VSTACK, and FILTER.Lightweight software with a familiar interface for quick financial calculations.Built-in tools to convert data ranges to structured tables instantly.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get a #SPILL! error when using the UNIQUE function?

A #SPILL! error occurs when the cells below your formula aren't completely blank or when you try to use dynamic arrays inside an Excel Table. Clear any text, spaces, or formatting in the spill range to allow the formula to expand, or move the formula outside of the table.

Can I use VSTACK in Excel 2016 or 2019?

No, VSTACK is a dynamic array function only available in Microsoft 365 and Excel 2021 or newer. For older versions, you must manually stack the data or use Power Query to append the columns.

How do I calculate the actual balance after getting the unique account list?

Once you have the unique list of accounts, use SUMIFS to calculate the balance. Assuming A2 is your unique account name, the formula would be: =SUMIFS(Table1[Amount], Table1[To], A2) - SUMIFS(Table1[Amount], Table1[From], A2).

Why can't I use dynamic array formulas inside an Excel Table?

Excel Tables require structured, predictable data layouts and do not support dynamic arrays that change size automatically. You must either place the formula outside the table or use the INDEX and ROW workaround to force a single result per row.