How to Combine Data from Multiple Google Sheets Tabs into One Sheet

Consolidating data across multiple tabs in Google Sheets is a daily headache for teams tracking sales by month, inventory by region, or responses across multiple departments. Copying and pasting rows manually is slow, error-prone, and breaks the moment source tabs are updated.

Instead of manual labor, Google Sheets offers dynamic formulas that stack and consolidate datasets automatically. This guide covers the three best ways to combine data from multiple tabs into a single master sheet.


Method 1: The Modern Way (VSTACK)

If you are using modern Google Sheets, the VSTACK function is the fastest and cleanest method to vertically stack ranges from different tabs.

Formula Syntax

=VSTACK(range1, range2, [range3, ...])

Step-by-Step Example

Suppose you have three monthly sales tabs named Jan, Feb, and Mar, each containing data in columns A:D (with headers in row 1):

  1. Open a new tab and name it Consolidated.
  2. Copy your column headers into row 1.
  3. In cell A2, enter the following formula:
=VSTACK(Jan!A2:D, Feb!A2:D, Mar!A2:D)

Why this works: VSTACK grabs the data from each specified tab (skipping row 1 to avoid duplicate headers) and stacks them into one continuous list. When data changes in any monthly tab, the master sheet updates instantly.

Pro Tip: To automatically remove blank rows resulting from open ranges like A2:D, wrap VSTACK inside a FILTER or QUERY function.

Method 2: Remove Blank Rows Automatically (VSTACK + FILTER)

When pulling entire columns (e.g., Jan!A2:D), empty rows will create large gaps in your master sheet. You can strip out blank rows cleanly using FILTER.

Formula Example

=FILTER(VSTACK(Jan!A2:D, Feb!A2:D, Mar!A2:D), VSTACK(Jan!A2:A, Feb!A2:A, Mar!A2:A) <> "")
Part of Formula Function
VSTACK(Jan!A2:D, ...) Stacks all columns A through D from every tab.
VSTACK(Jan!A2:A, ...) <> "" Checks column A across all tabs and excludes rows where cell A is blank.

Method 3: Advanced Filtering & Sorting (QUERY + Array Literal)

If you need to combine data from multiple tabs, filter out blank rows, and sort or reorder columns simultaneously, the QUERY function combined with array braces {} is the most powerful approach.

Formula Example

=QUERY({Jan!A2:D; Feb!A2:D; Mar!A2:D}, "SELECT * WHERE Col1 IS NOT NULL ORDER BY Col1 ASC", 0)

Key Details to Remember:

  • Semicolons inside braces {...; ...}: In Google Sheets array syntax, a semicolon stacks ranges vertically, while a comma places them side by side.
  • Use Col1, Col2 notation: When passing an array {...} into QUERY, refer to columns as Col1, Col2, etc., rather than A, B.
  • WHERE Col1 IS NOT NULL: Instantly eliminates empty rows from your merged dataset.

Method Comparison: Which Should You Use?

Method Best Used For Complexity
VSTACK Quickly stacking tabs with identical structures and fixed row counts. Easy
VSTACK + FILTER Stacking tabs with open ranges while automatically removing empty rows. Intermediate
QUERY + {} Consolidating tabs while sorting, filtering, or selecting specific columns. Advanced

Troubleshooting Common Errors

  1. #REF! Error (Array result was not expanded):
    Check if there are manual entries or text in the cells below your formula. The target area must be completely empty for the combined data to expand.
  2. Mismatched Column Counts:
    All ranges inside VSTACK or {} must have the exact same number of columns (e.g., combining A2:D with A2:C will trigger an error).
  3. Tab Names with Spaces:
    If your tab names contain spaces or special characters (e.g., Jan Sales), enclose the tab names in single quotes: 'Jan Sales'!A2:D.

Comments