In Google Sheets, stack tabs with curly braces and semicolons: ={Apr!A2:F; May!A2:F; Jun!A2:F}. Wrap it in QUERY to drop the blank rows that open-ended ranges bring along. When the statements live in different files, put IMPORTRANGE inside the braces for each file.
What is the basic stacking formula?
Suppose each tab has the same six columns, with headings in row 1 and data from row 2. On a new tab, in A1, enter:
={Apr!A1:F1; Apr!A2:F; May!A2:F; Jun!A2:F}
The first part brings the headings once, and each later part brings only the data. Using A2:F without a last row number takes everything down the sheet, so new rows added to a tab appear automatically. A semicolon stacks vertically, a comma places side by side. In some regional settings the separators differ; if Sheets rejects the formula, check the locale under File, Settings.
How do you remove the blank and header rows?
Open-ended ranges add a long run of empty rows, which then sit inside the stack. QUERY removes them:
=QUERY({Apr!A2:F; May!A2:F; Jun!A2:F}, "select * where Col1 is not null", 0)
QUERY names the columns of an array Col1, Col2 and so on. The final 0 says the data has no heading row of its own. If a repeated heading sneaks in from one tab, it is text inside a date column; QUERY normally ignores minority-type values in a column, but check the result, and add a condition such as Col1 <> "Date" if one gets through.
How do you add a label showing the source tab?
Put a label column ahead of each range, built with ARRAYFORMULA:
=QUERY({ARRAYFORMULA(IF(Apr!A2:A="","","Apr")),Apr!A2:F; ARRAYFORMULA(IF(May!A2:A="","","May")),May!A2:F}, "select * where Col2 is not null", 0)
The label shows only on rows where the date is filled, and the filter on Col2 (now the date column, one place to the right) removes the rest. Check by counting rows per label, for example =COUNTIF(A:A,"Apr") against the number of data rows on the Apr tab.
What if the statements are in different files?
IMPORTRANGE reads from another spreadsheet. Its two arguments are the other file's link, in quotation marks, and the range, such as "Apr!A2:F". Copy the link from the browser's address bar of that file; do not share it publicly. The first time, a #REF! error appears with an Allow access button; press it once per file.
=QUERY({IMPORTRANGE("link-to-first-file","Apr!A2:F"); IMPORTRANGE("link-to-second-file","May!A2:F")}, "select * where Col1 is not null", 0)
Do the formulas replace the original data?
No, they read it. That is the strength and the risk. If you delete a source tab, the combined list loses it. If you want a frozen yearly copy, select the combined range, copy and use Paste special, Values only into a new tab. Do that before you tidy or rename the originals.
Another point to watch is speed. A Sheets formula that pulls many tabs with whole-column ranges can lag. If the sheet slows, replace A2:F with a bounded range such as A2:F1000, large enough for a month's rows, and the work shrinks.
To sort the combined list by date, wrap the whole thing in SORT with the date column and TRUE for ascending, for example =SORT(QUERY(...), 2, TRUE) when a label sits in column 1 and the date in column 2.
A quick check list
- Each tab has the same columns in the same order.
- Headings come once, from the first tab only.
- Row count of the combined list equals the sum of the tabs.
- Dates are real dates, aligned to the right.
- A values-only copy is saved at year end.
If your statements come as PDF, CSV or Excel files and you would rather skip the tab juggling, SpendixAI takes them as uploads, with your review before saving.
Useful ideas start with a clearer picture of your own spending.
Explore your reports


