How to Use VSTACK Function in Excel + Tips

Learn how to use VSTACK function in Excel step-by-step to combine ranges vertically top-to-bottom with simple examples and tips.

Advertisement
Formula
=VSTACK(array1, [array2], ...)

Hello everyone! Today i will show you how to use VSTACK function in Microsoft Excel step by step.


1. What is VSTACK Function in Excel?

The VSTACK function (Vertical Stack) is a dynamic array function in Excel 365 and Excel 2024. It allows you to combine two or more cell ranges or arrays top-to-bottom vertically into one single combined table.

Instead of manually copying and pasting multiple tables under each other, VSTACK stacks them automatically and updates dynamically whenever your source data changes!

📚 Related Tutorial: Want to combine tables side-by-side horizontally instead? Learn about How to Use HSTACK Function in Excel!


2. 🛠️ Formula Syntax & Parameters

=VSTACK(array1, [array2], ...)
  • array1: Required. The first array or range of cells to stack.
  • [array2], ...: Optional. Additional arrays or cell ranges to stack vertically beneath array1.

Advertisement

3. 📋 Practical Examples

Example 1: Combine Two Monthly Sales Tables (Top-to-Bottom)

Suppose you have January Sales in range A2:B4 and February Sales in range A7:B9:

January Sales (A2:B4):

EmployeeSales
Sok$500
Dara$700
Lina$800

February Sales (A7:B9):

EmployeeSales
Sam$600
Bopha$900
Piseth$450
=VSTACK(A2:B4, A7:B9)

👉 Result: Combines both tables into one continuous list with 6 rows!


Example 2: Combine Multiple Sheets Data

You can stack ranges from different worksheets into a master summary sheet:

=VSTACK(Sheet1!A2:C10, Sheet2!A2:C10, Sheet3!A2:C10)

👉 Result: Appends rows from Sheet1, Sheet2, and Sheet3 into a single combined list automatically!


Example 3: Add Custom Table Headers

You can pass array headers like {"Employee Name", "Department", "Sales"} into VSTACK to create a complete table with headers on top:

=VSTACK({"Employee Name", "Department", "Sales"}, A2:C10)

Example 4: Handle Ranges with Different Column Widths

If array1 has 2 columns (A2:B4) and array2 has 3 columns (D2:F4), VSTACK fills missing column entries with #N/A errors.

To clean up #N/A errors, wrap VSTACK inside IFNA:

=IFNA(VSTACK(A2:B4, D2:F4), "")

👉 Result: Replaces any missing cells with a clean blank ""!


💡 Quick Tips for Using VSTACK Function

  1. Remove Duplicates with UNIQUE: Stacking multiple tables often creates duplicate entries. Wrap VSTACK inside UNIQUE to get a clean deduplicated list: =UNIQUE(VSTACK(A2:A10, D2:D10)).
  2. Sort Combined Data Automatically: Wrap VSTACK inside SORT to organize your stacked table by score or date: =SORT(VSTACK(A2:C5, A8:C11), 3, -1).
  3. Clean Up Missing Columns with IFNA: When stacking ranges with unequal column counts, wrap inside IFNA(VSTACK(...), "") to replace #N/A with blank cells.
  4. Excel Version Requirement: VSTACK requires Microsoft 365, Excel 2024, or Excel for the Web.

📚 Related Resources & Tutorials

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement