Easily Combine Ranges with VSTACK and HSTACK in Excel
Posted on: 09/22/2024
Hello Excel users! I'm excited to share two powerful functions in Microsoft Excel 365 that will make combining data ranges a breeze: VSTACK and HSTACK. These dynamic array functions allow you to efficiently merge data vertically and horizontally. Let me walk you through how to use them.
Understanding VSTACK Function
VSTACK is perfect for combining data vertically. Here's how to use it:
-
Start with your data separated into different ranges
-
In a new cell, type =VSTACK(
-
Select your first range, add a comma
-
Select your second range, add a comma
-
Continue for all ranges you want to combine
-
Close the parenthesis and press Enter
For example:
=VSTACK(A2:B4, D2:E4, G2:H4)
Don't forget to copy and paste your header row above the combined data!

VSTACK function in Excel
YouTube Video - Easily Combine ranges with VSTACK and HSTACK in Excel
Exploring Dynamic Array Features
One of the best things about VSTACK is that it's a dynamic array function. This means:
-
The formula is only entered in one cell
-
Results automatically "spill" into adjacent cells
-
Changes to source data are instantly reflected in the results
Introduction to HSTACK Function
HSTACK works similarly to VSTACK, but combines data horizontally. It's less common, but can be useful in certain scenarios. Here's how to use it:
-
Select your ranges while holding down the Ctrl key
-
In a new cell, type =HSTACK(
-
With ranges still selected, close the parenthesis and press Enter
Online Training with Chris Menard - Copilot and Teams
Tip for Vertical Data
If you need your HSTACK result vertical:
-
Use Ctrl+A to select the HSTACK result
-
Copy and Paste Special > Transpose
Combining Worksheets with VSTACK
VSTACK can even combine data from different worksheets:
-
In a new cell, type =VSTACK(
-
Click on the first worksheet tab
-
Select the data range
-
Add a comma
-
Click on the second worksheet tab
-
Select the data range
-
Close the parenthesis and press Enter
Example formula:
=VSTACK(Sheet3!A2:C10, Sheet4!A2:C10)
Online Training with Chris Menard - Excel Bundle
Essentials, Intermediate, and Advanced Training bundled together
FAQ about VSTACK and HSTACK Functions
Can I combine more than two ranges or worksheets?
Yes! You can add as many ranges as needed in both VSTACK and HSTACK, separated by commas.
Will the combined data update if I change the source?
Absolutely. As dynamic array functions, both VSTACK and HSTACK will automatically update when source data changes.
Do I need a special version of Excel for these functions?
VSTACK and HSTACK are available in Microsoft Excel 365. They may not be present in older versions of Excel.
I hope this tutorial helps you efficiently combine and manage your Excel data! Remember to check out my online training classes for more Excel tips and tricks. Have a wonderful day!
Recent Articles
Summarize Outlook Attachments with Copilot
In today’s fast-paced digital world, managing emails efficiently is crucial, especially when it comes to handling attachments. I demonstrate an exciting new feature that has rolled out in Microsoft Outlook’s Copilot — the ability to summarize Outlook attachments with Copilot
Chris Menard
Chris Menard is a Microsoft Certified Trainer (MCT) and Microsoft Most Valuable Professional (MVP). Chris works as a Senior Trainer at BakerHostetler - one of the largest law firms in the US. Chris runs a YouTube channel featuring over 900 technology videos that cover various apps, including Excel, Word, PowerPoint, Zoom, Teams, Coilot, and Outlook. To date, the channel has had over 25 million views.
Menard also participates in 2 to 3 public speaking events annually, presenting at the Administrative Professional Conference (APC), the EA Ignite Conference, the University of Georgia, and CPA conferences. You can connect with him on LinkedIn at https://chrismenardtraining.com/linkedin or watch his videos on YouTube at https://chrismenardtraining.com/youtube.
Categories