How to Use VSTACK and HSTACK Functions in Excel
Stacking and appending data is crucial for data transformation and analysis. These tasks allow us to combine multiple datasets, merge columns or rows, and ultimately create a unified view of our information. This can be accomplished with two powerful functions that simplify this process: VSTACK and HSTACK.
By leveraging the VSTACK and HSTACK functions, we can effortlessly stack and manipulate data without writing complicated formulas. In this article, we’ll learn about VSTACK and HSTACK and how to use them in Excel.

What Are VSTACK and HSTACK Functions in Excel?
The VSTACK and HSTACK Functions in Excel are pretty new functions. These functions were released as new text manipulation functions in 2022 and can be used by Microsoft 365 users. Even theMicrosoft 365 Basic Tierhas access to it. These functions are also one of the manyfeatures of Excel for the Webthat can be used to level up your productivity.
The VSTACK function, short for the vertical stack, allows you to append data and stack them vertically on top of each other. Its opposite pair is the HSTACK function, also called the horizontal stack, which allows you to append data horizontally and stack them side by side.

Both functions use the dynamic array environment to append data and stack them into a single and more extensive array. The data here can be a list, an array, data from multiple sheets, specific headers, or the same worksheet.
How to Use the VSTACK Function in Excel
The syntax of VSTACK is as follows:
The array argument in the function syntax is the arrays you wish to append vertically. Let’s start with a simple example. Imagine we have two tables, each with some alphabet and their respective numbers. To use the VSTACK:

Your final syntax should be:
it’s possible to also use the function and exclude your headers. Here, we have a list of names, and you wish to stack them together.

We can also sort the name by combining VSTACK with the SORT function in Excel. You can achieve this by wrapping the data in your table in a SORT and VSTACK.
How to Use the HSTACK Function in Excel
The syntax of HSTACK is:
The array argument in the function syntax is the arrays you wish to append horizontally. Let’s start with a simple example. We will use the letters and numbers data.

The final syntax will be:
Like the VSTACK, we can use the HSTACK with other functions, like the UNIQUE function in Excel. Let’s see how this plays out. This time, we want a list of unique values from two lists of chocolates. We can wrap our HSTACK within the UNIQUE functions.
Stack Your Data Easily
Excel’s VSTACK and HSTACK functions may appear simple and fundamental at first glance. However, their true beauty emerges with other powerful functions like FILTER.
Harnessing the synergy between your functions can help you unlock a whole new level of data manipulation and analysis. So learn the simplicity of VSTACK and HSTACK and explore the endless possibilities they offer when integrated with other Excel functions.
Looking to streamline your data analysis in Excel? Learn how to effectively use the FILTER function to simplify your data and improve productivity.
Obsidian finally feels complete.
The best features aren’t the ones being advertised.
Your phone’s camera app doesn’t show this, so it’s easy to miss.
Your phone is a better editor than you give it credit for.
Don’t let aging hardware force you into buying expensive upgrades.