Articles

How do you map a trial balance to financial statements in Excel?

List the first account of each statement line, look up every account with an approximate match, and total by line. New accounts map themselves.

To map a trial balance in Excel, do not list every account in the mapping table. List the first account of each statement line, sorted, and find each account's line with an approximate match: =INDEX(lines,MATCH(account,starts,1)). An account opened next month falls into the right line without touching the map. Then =SUMIFS(balance,line,"Revenue") totals each line, and the lines must add up to zero like the trial balance itself.

The case comes from the Excel for Finance course by Julian R. Sterling, author of The Real Estate Asset Manager.Get the DRM-free PDF, $19.99 →

The map

Map of the case: first account of each statement line.
From accountStatement line
1000Cash
1100Trade receivables, net
1200Inventory
1300Other current assets
1500Property and equipment, net
2000Payables and accruals
2500Borrowings
3000Equity
4000Net revenue
5000Cost of sales
6000Operating expenses
6500Depreciation
6600Operating expenses
7000Interest expense
8000Income tax

MATCH with 1 returns the position of the largest start that is less than or equal to the account. Account 1550, accumulated depreciation, lands on 1500, property and equipment, net. Account 6900 lands on 6600, operating expenses. The starts must be sorted in ascending order.

The formulas

Line    =INDEX($I$5:$I$19,MATCH([@Account],$H$5:$H$19,1))
Type    =IF([@Account]<4000,"Balance sheet","Income statement")
Amount  =SUMIFS(TB[Balance],TB[Line],K5)

With XLOOKUP (Excel 2021 and Microsoft 365) the line is =XLOOKUP([@Account],starts,lines,,-1): match mode -1 means exact or next smaller.

The result

Northgate Foods (fictional), trial balance of 27 accounts at 31 December 2026 by statement line, US$. Debits positive, credits negative.
Statement lineAmount
Cash$255,800
Trade receivables, net$1,398,713
Inventory$541,800
Other current assets$33,000
Property and equipment, net$1,048,100
Payables and accruals-$892,400
Borrowings-$511,700
Equity-$1,704,194
Net revenue-$8,252,967
Cost of sales$6,507,549
Operating expenses$1,312,200
Depreciation$140,300
Interest expense$33,000
Income tax$90,800
Total$0

Revenue shows as -$8,252,967 because credits are negative. Net income is minus the sum of the income statement lines: $169,118.

Three checks

Sources

  1. Julian R. Sterling, Excel for Finance: Formulas, Lookups & Pivot Tables (course, 2026): running case Northgate Foods
  2. Microsoft Support, documentation of SUMIFS, EOMONTH, MATCH, XLOOKUP and PivotTables (consulted November 2026)

Every figure is computed by script from the course's running case, Northgate Foods, a fictional food distributor, and checked on 27 November 2026. For education, not investment or accounting advice.

Learn the Excel that finance runs on

32 lessons on references, tables, INDEX and MATCH, XLOOKUP, SUMIFS, dates, text, pivot tables and checks, built on 5,000 invoice lines of one company, with step files, exercises, a quiz app and a certificate exam ($149).

Read module 1 free →

Questions readers ask

Why use an approximate match to map accounts?

Because the map then lists ranges, not accounts: any account between two starts takes the line of the lower one, including accounts opened after the map was built.

What happens if the map is not sorted?

MATCH with 1 assumes ascending order. On an unsorted map it returns a plausible wrong line without any error, so keep the map sorted and check that the lines total zero.

Should credits be negative in the mapping?

Keeping debits positive and credits negative lets the lines add up to zero, which is the simplest check that nothing was lost.

Read the whole case

This article is one calculation from The Real Estate Asset Manager. The book takes the same case from first principles to the decision, chapter by chapter, and every figure it prints is a live formula in the free companion workbooks.

See the course →Free companion files

Also on Amazon UK · Amazon Germany · Amazon France · Amazon Canada

Prefer a PDF? The same book is sold as a DRM-free PDF edition, searchable and printable. Get the PDF edition, $19.99

Also on this site

All 5643 articles →