Category: FUNCTION | Updated: 2026-11-22
How to Use the VSTACK Function in Google Sheets | Stack Multiple Tables Vertically
What Is the VSTACK Function?
The VSTACK function stacks multiple cell ranges or arrays vertically in order to combine them into one larger table. It is very convenient for consolidating monthly sheets or department lists that share the same column structure into a single database.
Syntax
=VSTACK(range1, [range2, ...])
- range1: The first cell range or array to place at the top.
- range2, … (optional): Additional cell ranges or arrays to stack underneath, in order.
Practical Examples
This example vertically combines “Tokyo Branch Data” (A2:B3) and “Osaka Branch Data” (D2:E3) into a single table starting at G2.
| Row | Col A | Col B | Col D | Col E | Formula in Col G | Col G (Combined) | Col H (Combined) |
|---|---|---|---|---|---|---|---|
| 1 | Store | Sales | Store | Sales | Store | Sales | |
| 2 | Tokyo A | 500 | Osaka A | 450 | =VSTACK(A2:B3, D2:E3) |
Tokyo A | 500 |
| 3 | Tokyo B | 300 | Osaka B | 600 | (Auto-expanded) | Tokyo B | 300 |
| 4 | (Auto-expanded) | Osaka A | 450 | ||||
| 5 | (Auto-expanded) | Osaka B | 600 |
Common Errors and Precautions
#N/Aerror (mismatched column counts): When stacking ranges with different numbers of columns,#N/Aerrors appear in the extra cells of the narrower range. Match the column counts or wrap the formula inIFERRORlike=IFERROR(VSTACK(A2:B3, D2:F3), "")to replace them with blanks.#REF!error (obstruction in the output range): If any cell where the combined table expands already contains data, a#REF!error occurs.- Blank rows included: If you specify a wide range like
A2:B100to leave room for growth, blank rows will also be stacked. CombineVSTACKwithFILTERorQUERYto exclude blank rows.
Frequently Asked Questions
Q. What happens if I vertically stack tables with different numbers of columns using VSTACK?
A. The total number of columns matches the widest table, and #N/A errors fill the extra cells on the right of narrower tables. Wrap the formula in IFERROR to hide these errors.
Q. Can I combine tables from different sheets into one using VSTACK?
A. Yes. Simply list the ranges with their sheet names, like '=VSTACK(Sheet1!A2:C10, Sheet2!A2:C10)', to stack them vertically.