Trial Balance from a Journal CSV
Operator: Abdulla Al Fahad. How tools are built and checked
A ledger kept in a spreadsheet fails in a quiet way: one entry is keyed with a debit of 950.00 and a credit of 800.00, nothing complains, and three months later the trial balance is out by 150.00 with no hint of where. This page tests every entry for balance before it builds anything, so the entry that breaks the books is listed by its ID, date and difference.
From a journal with a date, an account and debit and credit amounts it then produces a trial balance as of a date you choose, an income statement for a period and a balance sheet. Account types come from an editable chart of accounts, and the XLSX download holds live formulas so the statements recalculate when you change the period.
Key features
- Per-entry balance check using an entry or journal ID column, or per date when the file has none
- Trial balance as of any end date, with debit and credit columns and a total that shows any difference
- Income statement for a start and end date, and a balance sheet with current-period earnings closed into equity
- Account types guessed from a leading account number or from words in the name, editable for each account
- XLSX with Journal, Settings, Trial balance, Income statement and Balance sheet sheets, built on SUMPRODUCT formulas, plus a CSV for each statement
Journal layout, account types and what each statement includes
The journal needs a date column, an account column and either two amount columns (debit and credit) or one signed column in which debits are positive and credits negative. An entry or journal ID column is optional but worth choosing: lines that share an ID must balance together. Without it the page balances each date as a whole, which hides two offsetting mistakes on the same day.
A comma-separated or semicolon-separated file is read either way, and amounts written with a decimal comma (1.234,56), as many European accounting exports do, are detected from the amount columns and read that way, and that is reported. Amounts are read with parentheses as negatives and thousands separators removed, then held as millionths of a unit so that sums are exact and no entry is called unbalanced because of floating-point noise. A difference of half a cent or less counts as balanced. A negative number in the debit column is treated as a credit of the same size, and the number found is reported. Rows with no date, no account or no amount are skipped and counted.
Types are guessed in two steps. A leading account number decides first: 1 is an asset, 2 a liability, 3 equity, 4 revenue and 5 to 9 an expense. Without a number, qualifiers come first: payable, accrued or deferred make a liability, receivable, prepaid or accumulated make an asset, and cost of sales is an expense. Then words such as cash, capital, sales or rent decide, and anything unrecognised becomes an expense. The guess is a starting point, so check each account in the chart of accounts.
How it works
Each account's balance is the sum of its debits minus its credits over every line up to the period end. The trial balance lists that net amount in the debit or the credit column. The income statement uses only lines inside the period for accounts typed as revenue or expense, so a period that starts in February shows February's activity alone.
The balance sheet takes asset, liability and equity balances up to the end date, and adds a line for earnings to date: all revenue less all expense from the first journal line, which is what closing the books would move into retained earnings. Assets then equal liabilities plus equity plus earnings exactly when every entry balances and every account has the right type.
Common use cases
- A freelancer who tracks 400 journal lines a year in a spreadsheet and needs a trial balance for the accountant before the filing deadline.
- A founder reconciling a ledger exported from a bank-feed tool: the entry check shows 3 of 212 entries with a one-sided line, all dated the same week.
- A treasurer of a club with a chart of accounts numbered 1000 to 6900 who wants quarterly statements by changing only the period dates in the workbook.
- A student checking a textbook journal exercise: the trial balance difference is 150.00 and the entry check points at the single entry to correct.
How to use this tool
- Drop the journal file or paste it, or load the example journal.
- Check the date, account, debit, credit and entry ID columns the page picked, and set the slash-date order if your dates use slashes.
- Read the entry check and fix any unbalanced entry in your own file; reload to confirm.
- Review the chart of accounts and change any type that was guessed wrongly, then set a period start and end if you need one.
- Download the XLSX for formulas you can change, or a CSV for each statement.
Example
Two lines of a journal, as they would sit in your CSV
date,entry,account,debit,credit,memo
2025-02-27,J-009,6300 Software,950.00,,Annual licences
2025-02-27,J-009,2000 Accounts Payable,,800.00,Annual licencesWhat the entry check lists
J-009, 2025-02-27, 2 lines: debits 950.00, credits 800.00, difference 150.00
The trial balance built from the whole journal is then out by the same 150.00 (see the section below for the full example).Tips for best results
- When the trial balance difference equals the difference of one entry, you have found the cause. When it matches no single entry, add up the differences in the entry check list: they always sum to the trial balance difference, so several entries are off. A line skipped for an unreadable date or amount also shows up as a one-sided entry.
- Set the period end to a month end and compare the balance sheet with your bank statement for the cash account: the cash line is a plain running balance of its debits and credits.
- Use the drill-down on the trial balance to list the lines in one account with a running balance before you question a total.
Common pitfalls
The page does not close the books. Earnings to date appear as one equity line instead of being posted to retained earnings, and a period that starts mid-year does not carry opening balances for revenue and expense accounts.
An account name spelled two ways is two accounts. Case and repeated spaces are ignored, but "Rent" and "Rent Expense" are separate lines.
Without an entry ID column, two mistakes that cancel on the same date will pass the balance check. Choose the ID column whenever the file has one.
In the workbook every account keeps the type it had at export. A line you add on the Journal sheet for an account that is not already listed appears on no statement until you export again.
Common errors and how to fix them
- No journal lines could be read. Check the date, account and amount columns.
- The date column must hold dates the page recognises and every line needs an account and a nonzero amount. Try the other slash-date order if the dates look right.
- More than 1000 accounts; the account column probably holds free text.
- Pick the column that holds account names or numbers rather than a description, or reduce the detail in the account column before loading.
- The journal has 340,000 lines; the limit is 300,000.
- Split the file by year and run each part, or summarise to monthly totals per account first.
Best practices
- Number accounts so that the first digit gives the type (1 assets through 5 to 9 expenses); the page then needs no guessing.
- Give every entry an ID in the source file, even a running number, so the balance check can name the failing entry.
- Keep one journal per legal entity. The statements add every line in the file.
Checking the bundled example by hand
The example journal has 15 entries from January to March 2025, and entry J-009 is deliberately 150.00 short on the credit side. Loaded whole, the trial balance shows debits of 54,950.00 and credits of 54,800.00. The income statement for the whole file reports revenue of 29,800.00, expenses of 21,950.00 and net income of 7,850.00, and for 1 to 28 February revenue of 12,600.00, expenses of 7,950.00 and net income of 4,650.00.
On the balance sheet, assets are cash 21,400.00 plus receivables 7,400.00 plus equipment 4,200.00, which is 33,000.00. Equity is 25,000.00 plus earnings of 7,850.00, which is 32,850.00. The 150.00 gap is exactly the shortfall in J-009, and every amount is held as an exact millionth, so no rounding hides or creates a difference.
What the XLSX formulas do
The Settings sheet holds the period start and end as real dates. Each Trial balance row computes its net amount with a SUMPRODUCT over the Journal sheet that compares account names exactly, so a name containing an asterisk or a question mark is not read as a wildcard, and then splits it into a debit and a credit column. The Income statement uses the same formula with a start date as well, and the Balance sheet points at the Trial balance rows. Every account in the journal is listed on every statement, zero rows included, so moving the dates to a period in which a later account is active needs no new export; only the account types are fixed at export.
Above 50,000 journal lines the workbook is written with values instead of formulas, because thousands of whole-column comparisons make Excel slow to open. The page says so after the download. Memo and account text that a spreadsheet could run as a formula is stored as plain text, so opening the file never executes anything.
Frequently asked questions
My bank exports semicolons and decimal commas. Will it load?
Yes. A header line separated by semicolons is read as a semicolon file, and amounts such as 1.234,56 or 800,00 are read with a decimal comma when the amount columns show that pattern and none uses a decimal point. A note under the entry check says so.
Can I use a single signed amount column instead of debit and credit?
Yes. Choose One signed column in the settings and pick the amount column; positive numbers are debits and negative numbers are credits. A bank export where outflows are negative needs the sign reversed first if the account is a liability.
Why is an account on the wrong statement?
Its type is wrong. Types are guessed from the account number or name, and anything unrecognised becomes an expense, so an account whose name the word lists do not cover (a reserve, say) often lands among the expenses. Change it in the chart of accounts card. A wrong type moves an amount between statements and changes net income, but it cannot unbalance the balance sheet: when every entry balances, assets always equal liabilities plus equity plus earnings, whatever the types.
Does it handle multiple currencies?
No. Amounts are added as plain numbers, so a journal that mixes currencies in one column will produce meaningless totals. Convert to one currency before loading.
When would the profit and loss page suit me better?
The profit and loss page maps categorised transactions to monthly columns and margins. This page starts from double-entry lines, checks that each entry balances, and adds the trial balance and balance sheet.