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.
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 beneatharray1.
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):
| Employee | Sales |
|---|---|
| Sok | $500 |
| Dara | $700 |
| Lina | $800 |
February Sales (A7:B9):
| Employee | Sales |
|---|---|
| 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
- Remove Duplicates with
UNIQUE: Stacking multiple tables often creates duplicate entries. WrapVSTACKinsideUNIQUEto get a clean deduplicated list:=UNIQUE(VSTACK(A2:A10, D2:D10)). - Sort Combined Data Automatically: Wrap
VSTACKinsideSORTto organize your stacked table by score or date:=SORT(VSTACK(A2:C5, A8:C11), 3, -1). - Clean Up Missing Columns with
IFNA: When stacking ranges with unequal column counts, wrap insideIFNA(VSTACK(...), "")to replace#N/Awith blank cells. - Excel Version Requirement:
VSTACKrequires Microsoft 365, Excel 2024, or Excel for the Web.
📚 Related Resources & Tutorials
Related Tutorials
Opens in new tab ↗How to Use HSTACK Function in Excel + Tips
Learn how to use HSTACK function in Excel step-by-step to combine ranges horizontally side-by-side with simple examples and tips.
How to Use SEQUENCE Function in Excel + Tips
Learn how to use SEQUENCE function in Excel step-by-step to generate automatic numbers, dates, and tables with easy examples and tips.
How to Use TAKE Function in Excel + Tips
Learn how to use TAKE function in Excel step-by-step to extract the first or last N rows and columns from a range with simple examples and tips.