By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: These two Excel functions make stacking data from multiple sheets too easy
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > Computing > These two Excel functions make stacking data from multiple sheets too easy
Computing

These two Excel functions make stacking data from multiple sheets too easy

News Room
Last updated: 2025/09/23 at 2:10 PM
News Room Published 23 September 2025
Share
SHARE

This situation is all too common: you need to consolidate data from multiple Excel sheets for data analysis or reporting purposes. Copying and pasting the data can work, but it’s an error-prone process, and the resulting range will not be dynamic (many people just like their data to be dynamic). But don’t worry—Excel has you covered with the VSTACK and HSTACK functions.

These functions were introduced in Microsoft 365 specifically for the purpose of combining arrays or ranges into a single entity. They also keep things dynamic, making them ideal for data that changes constantly. I will show you how to use them, as well as what you can do to make them account for data growth using the FILTER function.

VSTACK

For data that needs to be ready for analysis

The VSTACK function combines data from multiple ranges or arrays by stacking them vertically—one on top of the other and in the order they’re entered. The result is a longer array that can be used with statistical analysis tools like PivotTables and charts.

        =VSTACK(range1, [range2], ...)

The parameter range1 is the first range or array you want to stack. The range2 parameter and other optional parameters are the subsequent ranges and arrays to be placed below the previous ones.

Here is an example of what stacking data with the VSTACK function would look like:

        =VSTACK(Sheet1!A2:D21, Sheet2!A1:D21, Sheet3!A1:D21, Sheet4!A1:D21)

For VSTACK to work, the columns must have the same structure across all ranges. Otherwise, the function will return blank cells or zeros in the empty cells (although it will still work), and the sheet will look untidy.

HSTACK

Best for side-by-side comparisons

The HSTACK function combines data horizontally by stacking each selected range or array side by side. This results in a wider array that’s suitable for side-by-side comparisons in tools like reports and dashboards.

        =HSTACK(range1, [range2], ...)

The range1 parameter is the first range or array to be stacked. range2 and optional parameters are subsequent ranges and arrays to be placed to the right of the previous ones. Again, this depends on the order in which they’re entered.

Here is an example of the HSTACK function in action:

        =HSTACK(Sheet1!A1:E3, Sheet2!A1:E3, Sheet3!A1:E3, Sheet4!A1:E3)

For the HSTACK function to work as expected, the ranges should have the same number of rows across all sheets. As with the VSTACK function, failing to adhere to this practice will result in either blank cells or zeros.

Making VSTACK and HSTACK more dynamic

It’s always best to account for growth

So far, the data is dynamic, meaning if one of the values in the selected ranges changes, the corresponding ones in the resulting array from the VSTACK or HSTACK will be automatically updated. The problem is that if the ranges grow, the functions will not pick this up automatically.

One way to overcome this is to convert each of those ranges into a table. Here are the steps to do that:

  1. Select the range, including the headers.
  2. Select the Insert tab.
  3. Click Table in the Tables command group of the ribbon.
  4. In the pop-up, check My table has headers.
  5. Click OK.

If you don’t want to go through the hassle of creating tables, you can select extra rows and columns to account for the data that hasn’t been added yet. For instance, if the used cells are A2:A21, you can choose A2:A51 instead—that’s 30 extra cells.

You will notice that there are rows or columns that are blank or filled with zeros where the empty cells should be. This will make the sheet look untidy, but you can remove them with the FILTER function.

Here is an example of what the formula would look like:

        =FILTER(VSTACK(Sheet1!A2:D51, Sheet2!A2:D51, Sheet3!A2:D51, Sheet4!A2:D51), VSTACK(Sheet1!A2:A51<>"", Sheet2!A2:A51<>"", Sheet3!A2:A51<>"", Sheet4!A2:A51<>""))
    

If you know how the FILTER function works, then the first parameter is the array we want to filter. The second parameter is the condition that filters it using Excel’s logical operators. Essentially, the formula excludes any row without a value from the result.

Don’t forget to transpose the data when you need to

Make sure the data is in the format you need

As mentioned earlier, the VSTACK function is best suited for data that requires analysis, while the HSTACK function is well-suited for data that needs to be compared. But if you need a VSTACK result for comparison or an HSTACK result for analysis, you can transpose the data, which will flip the rows and columns.

You can transpose the data statistically with a few clicks. Here’s how to do that:

  1. Select the range you want to transpose.
  2. Right-click an empty cell and select Paste Special in the menu.
  3. Check Transpose in the dialog box.
  4. Click OK.

If you want to transpose the data dynamically (recommended), you can use the TRANSPOSE function. Here’s an example:

        =TRANSPOSE(VSTACK(Sheet1!A2:D21, Sheet2!A2:D21, Sheet3!A2:D21))

Become the master of stacking in Excel

The VSTACK and HSTACK functions enable efficient data combination from multiple sheets while maintaining dynamic functionality. They’re also quite easy to use with other functions if, for example, you want to work with growing datasets or need to transpose the data.

Furthermore, consider using them with the LET function in Excel as well. It will allow you to create variables, assign the sheets to them as values, and reference them in the formula. This will make the formula more human-readable and efficient.

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Get Ready for Fall Sports With Apple Arcade's October Lineup
Next Article EU tells Apple to crack down on online fraud
Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

The World’s Oceans Are Hurtling Toward Breaking Point
Gadget
Didi launches pet transportation service in seven Chinese cities · TechNode
Computing
Best TV deal: Get the 86-inch LG 4K LED TV for its lowest price yet
News
Klaasmeyer Construction taps Render Networks for quicker buildout | Computer Weekly
News

You Might also Like

Computing

Didi launches pet transportation service in seven Chinese cities · TechNode

1 Min Read
Computing

Nigeria extends ageing satellite’s life, delays replacement to 2028

11 Min Read
Computing

How to Celebrate Pride Month on Social Media in 2023 |

5 Min Read
Computing

10 Best Speech-to-Text Chrome Extensions For 2025 |

31 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?