VSTACK vs HSTACK Function in Excel Explained

Learn how to VSTACK and HSTACK in excel step by step with simple examples and excel video speak khmer.

Advertisement

Hello everyone! Today I show you how to use VSTACK and HSTACK function in Excel step by step with simple examples.

You ever want to combine two table together? Maybe one table on the top and one table on the bottom? Or maybe two table on the left and one on the right? If yes, then VSTACK and HSTACK is perfect for you! No more copy paste, Excel do it automatic. Video below is in Khmer so you can follow along easy.

1. VSTACK Formula in Excel

VSTACK mean "Vertical Stack". You use this when you want combine two or more table up and down — like stack paper on top of each other.

Syntax:

=VSTACK(array1, array2, ...)
  • array1 — your first table or range
  • array2 — your second table or range
  • You can add more table, no limit!

Example:

You have January sale in A2:C10 and February sale in A2:C8 on different sheet. You want combine both into one big table:

=VSTACK(Sheet1!A2:C10, Sheet2!A2:C8)

Now both table stack together vertical! January on top, February on bottom. Easy right?

💡 Tip: VSTACK auto include all row from both table. If your column number not match, Excel will fill missing cell with #N/A. Make sure both table have same number of column for best result.

2. HSTACK Formula in Excel

HSTACK mean "Horizontal Stack". You use this when you want combine two or more table left and right — like put two paper side by side.

Syntax:

=HSTACK(array1, array2, ...)
  • array1 — your first table or range
  • array2 — your second table or range
  • Same like VSTACK, you can add many table

Example:

You have Name list in A2:A20 and Score list in B2:B20 on two different place, and you want put them side by side:

=HSTACK(A2:A20, B2:B20)

Now Name column and Score column sit next to each other. Very clean!

💡 Tip: HSTACK is very useful when you want combine data from many column or many sheet into one wide table. If row number not match between table, Excel fill empty cell with #N/A automatic.

Advertisement

3. VSTACK vs HSTACK — What is Difference?

VSTACKHSTACK
DirectionStack up and down (vertical)Stack left and right (horizontal)
Use forCombine table with same columnCombine table with same row
Result shapeTaller tableWider table
Work on old Excel?No (365/2021 only)No (365/2021 only)

Simple rule to remember:

  • Use VSTACK when your table have same column and you want add more row → stack up and down
  • Use HSTACK when your table have same row and you want add more column → stack left and right

💡 Tip: You can combine VSTACK and HSTACK together for more complex task! Also, you can use VSTACK with FILTER or SORT to stack data and sort it at same time. Example: =SORT(VSTACK(Sheet1!A2:C10, Sheet2!A2:C8), 1) — this stack two table then sort by column 1. Very powerful!

📚 Useful Resources

Found this tutorial helpful? Share it with colleagues:
📚

Related Tutorials

Opens in new tab ↗
Advertisement