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.
Ravindra Bagale's Tip – मराठी
VSTACK करायच्या दोन्ही tables मध्ये columns ची order same पाहिजे – नाहीतर Amazon Now चा City column Blinkit च्या Area खाली येतो, आणि बऱ्याच students ना ते कळतही नाही. आधी headers compare करा. मोठा, रोज वाढणारा data असेल तर Power Query Append (Module 10.4) जास्त सुरक्षित आहे.
Ravindra Bagale's Tip – हिंदी
जिन दो tables को VSTACK करना है, उनमें columns का order same होना चाहिए – वरना Amazon Now का City column Blinkit के Area के नीचे आ जाता है, और बहुत से students को पता भी नहीं चलता. पहले headers compare करो. बड़ा, रोज़ बढ़ने वाला data हो तो Power Query Append (Module 10.4) ज़्यादा सुरक्षित है.
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.