The problem with pasting ledgers together
A QuickBooks Desktop ledger export belongs to one company file. If you look after several companies or clients, you end up with several exports, and pasting them under each other causes two problems:
- Nothing says whose row is whose. The company name only appears once, in the letterhead at the top of each file, and most files carry the same report title, “General Ledger”. Once the rows are stacked, an Acme Ltd. invoice and a Globex Inc. invoice look the same.
- Monthly updates double up. A year-to-date export is cumulative: September’s file already holds January to August. Paste it under August’s rows and eight months are counted twice.
The steps below fix both: every row gets a Ledger label before the files are combined, and each month’s export replaces that ledger’s old rows.
Step 1: Export every company file with identical settings
Open each company file in turn and run Reports › Accountant & Taxes › Transaction Detail by Account with exactly the same settings, so every export has the same columns in the same places:
- Customize Report › Display: Type, Date, Num, Name, Memo, Debit, Credit ticked, with Debit and Credit as separate columns.
- Customize Report › Header/Footer: Company Name and Report Title ticked.
- Excel › Create New Worksheet › in new workbook, and under Advanced untick Send header to Page Setup in Excel, so the company name stays in A1 and the title in A2.
- Save each one as .xlsx with a file name that says what it is, for example
Acme Ltd - GL - 2026-09.xlsx.
The full export settings, with the reasons for each, are in the single-ledger guide.
Step 2: Clean each export and add Ledger and Period columns
Flatten each file with the helper columns from step 3 of the single-ledger guide (Category, Sub-account, Sub-sub-account, Account and Net Amount). Add all three level columns to every file, even one whose accounts only go two levels deep, so every company ends up with the same columns.
While the letterhead is still in rows 1 to 3, add two more helper columns. With the headings on row 4, these go in row 5 and are copied down:
| Heading | Formula (row 5, copied down) |
|---|---|
| Ledger | =IF(OR($A$2="General Ledger",$A$2="Transaction Detail by Account"),$A$1,$A$1&" - "&$A$2) |
| Period | =$A$3 |
Ledger combines the company name with the report title, and drops a generic title that wouldn’t tell two ledgers apart:
| A1 (company) | A2 (report title) | Ledger |
|---|---|---|
| Acme Ltd. | Operating Ledger | Acme Ltd. - Operating Ledger |
| Acme Ltd. | General Ledger | Acme Ltd. |
| Globex Inc. | General Ledger | Globex Inc. |
Then finish the file as in the single-ledger guide: filter out rows with a blank Type, copy the visible rows and paste them as values. Pasting values matters here: it fixes the Ledger and Period text before the letterhead is gone.
Step 3: Stack the cleaned rows in one master table
- Start a new workbook for the combined ledgers, with a sheet called Transactions.
- Paste the first company’s cleaned rows, headings included, at A1. Press Ctrl+T and name the table on the Table Design tab, for example
Transactions. - For each further company, paste its cleaned rows (without the heading row) in the first empty row directly under the table. The table grows to take them in.
Check that the columns line up before you paste. If one company’s export has an extra column, such as Class, move or delete it first so every file matches.
Power Query can do the stacking for you: Data › Get Data › From File › From Folder combines every file in a folder. It works well once each file is already a clean table like the ones above. On raw exports it gets fiddly: the account levels need the same carry-down logic, files whose accounts go to different depths or have empty columns in different places break a single recipe, and the Total rows still have to be filtered out.
Step 4: Keep a Sources table as your audit trail
Add a sheet called Sources with one row per import:
| Ledger | File | Period | Rows | Imported |
|---|---|---|---|---|
| Acme Ltd. | Acme Ltd - GL - 2026-09.xlsx | January through September 2026 | (count) | (date) |
For the row count, =COUNTIF(Transactions[Ledger],"Acme Ltd.") stays correct as rows come and go. This sheet is how you’ll know, months from now, what’s in the workbook and which export each ledger came from.
Step 5: Pivot by ledger
- Select a cell in the master table and choose Insert › PivotTable.
- Put Category and Account in Rows and Net Amount in Values (set to Sum).
- Put Ledger in Filters to look at one company at a time, or in Columns to compare them side by side.
- For one-click filtering, select the pivot and choose PivotTable Analyze › Insert Slicer › Ledger.
Step 6: Next month, replace each ledger’s rows instead of appending
When a new year-to-date export arrives for a company:
- Clean it as in step 2.
- In the master table, filter Ledger to that company only.
- Select the visible rows, right-click and choose Delete › Table Rows. Clear the filter and check that the other companies are still there.
- Paste the new rows under the table.
- Update that ledger’s row on the Sources sheet with the new file name, period and date.
- Choose Data › Refresh All so the pivot picks up the change.
Only paste new rows on top of old ones when the exports cover separate periods, for example one export per month rather than year to date. The Period column tells you which kind you have.
When two ledgers end up with the same name
The replace step deletes everything under one Ledger name, so each name must belong to exactly one company. If two different companies would get the same name, say two clients both called Acme Ltd., or a file whose A1 is blank, give one of them a distinct name before you paste, such as Acme Ltd. (2) or Acme Ltd. (Guelph). As a rule: the same company and the same report means replace; a different company means keep both, under different names.
The shortcut
If you do this for several clients every month, LedgerCleaner, our Windows 10/11 app, handles the whole routine. Add the exports from any folders and it names each ledger from the company in A1 and the report title in A2 (you can rename any of them first). Next month, point it at the workbook you already have and use Add to workbook: a newer export of the same company and report replaces that ledger’s rows. A file whose name matches a different company is never silently overwritten: you choose Keep both (with a name such as Acme Ltd. (2) suggested), Replace, or Skip. A Sources sheet records every file with its ledger, period, basis and row count, and both pivots have a Ledger filter. It reads QuickBooks Desktop exports only (not QuickBooks Online), and the pivots need desktop Excel for Windows.
Questions
How many company files can I combine?
As many as fit on one worksheet. Excel’s limit is 1,048,576 rows per sheet, and the PivotTable reads them all from the one table.
Do the exports need to be in the same folder?
Not for the copy-and-paste method. Power Query’s From Folder option does need them in one folder.
The companies have different fiscal year-ends. Can I still combine them?
Yes. The dates are real dates, so calendar months and years always line up. For fiscal quarters, pick one start month for the combined report, or pivot each company separately. See the fiscal quarter guide.
Can I combine QuickBooks Online and QuickBooks Desktop ledgers?
Only after you’ve cleaned the Online export separately. QuickBooks Online lays out its ledger report differently (usually a single Amount column, with group rows instead of indented label columns), so the helper formulas here don’t apply to it. Once both are flat tables with the same columns, they stack the same way.