Excel VSTACK function
The VSTACK function combines multiple ranges or arrays vertically into one large array. And each subsequent array is appended at the bottom of the previous array.
Note: This function is only available in Excel for Microsoft 365 on the Insider channel.
VSTACK function VS. HSTACK function
The VSTACK function can be used to combine ranges vertically, while the HSTACK function can be used to combine ranges horizontally.
Syntax
=VSTACK(array1, [array2],...)
Arguments
Remarks
=IFERROR(VSTACK(array1,array2,...),"")
Return value
It returns an array.
Example
As shown in the screenshot below, there are two ranges that need to be appended to a single range vertically. You can apply the VSTACK function as follows to get it done.
Select a blank cell, such as C14 in this case, enter the following formula and press the Enter key to get the combined array.
=VSTACK(B7:C10,E7:F10)
Notes: If the ranges have different columns, #N/A error values will occur in the result array as shown in the screenshot below.
If you want to keep the cell blank when there is no value, you can apply the formula below to get it done.
=IFERROR(VSTACK(B7:C10,E7:G10),"")
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.