Ravindra BagaleCourses & study guides

9. Dynamic Arrays

9.8 VSTACK and HSTACK

Microsoft 365 / Excel 2024. =VSTACK(array1, array2, …) stacks vertically (append); =HSTACK(array1, array2, …) places side by side.

Worked example – append Blinkit and Amazon Now sheets without copy-paste.

=VSTACK(tblBlinkit, tblAmazonNow)

With a header row and removing blank rows:

=LET(all, VSTACK(tblBlinkit, tblAmazonNow),
     VSTACK(tblBlinkit[#Headers], FILTER(all, CHOOSECOLS(all,1)<>"")))

Build a report block: =HSTACK(UNIQUE(tblMini[Platform]), SUMIFS(tblMini[Amount], tblMini[Platform], UNIQUE(tblMini[Platform]))) → Blinkit 2,333, Amazon Now 537.

Ravindra Bagale's Tip

Both tables you VSTACK must have the columns in the same order – otherwise Amazon Now's City column lands under Blinkit's Area, and many students don't even notice. Compare the headers first. For big data that grows every day, Power Query Append (Module 10.4) is safer.

Practice task

Stack three monthly order Tables with VSTACK, sort the result by date and count the rows. Use HSTACK to show City, Sales and Orders side by side.