Lookup & Reference Excel 365 ◉ 8 views Dynamic Array

=HSTACK()

The arrays to append.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for Mac
=HSTACK(array1,[array2],...)
Hover argument names in the table for details.
Output typeArray
Popularity50 / 100
VolatileNo
Dynamic ArrayYes
📥 Download sample .xlsx — Coming soon ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =HSTACK() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
📥 Download HSTACK.xlsx — Coming soon ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

🧠 🧠 Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
array Range Required The arrays to append.

▣ Examples

چسباندن افقی دو محدوده A2:C3 و E2:G3 =HSTACK(A2:C3,E2:G3)
چسباندن افقی سه محدوده با اندازه‌های متفاوت =HSTACK(A2:B4,C2:D3,E2:F2)
چسباندن افقی با پر شدن سطرهای کوتاه‌تر با خطای ‎#N/A‎ =HSTACK(A2:B4,C2:D3,E2:F3)

✦ Tips

  • HSTACK returns the array formed by appending each of the array arguments in a column-wise fashion. The resulting array will be the following dimensions:
  • Rows The maximum of the row count from each of the array arguments.
  • Columns The combined count of all the columns from each of the array arguments.

⚠ Common Errors

#N/A If an array has fewer rows than the maximum width of the selected arrays, Excel returns a #N/A error in the additional rows. Use HSTACK inside the IFERROR function to replace #N/A with the value of your choice.
Fix: Make the ranges the same size or use IFNA

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.