Excel HSTACK function
Places ranges side by side in a single result. In Spanish Excel it is called APILARH.
Syntax
English Excel
=HSTACK(array1, [array2], …)
Spanish Excel (Mexico)
=APILARH(matriz1, [matriz2], …)
Spanish Excel (Spain, Latin America)
=APILARH(matriz1; [matriz2]; …)
| Argument | What it is |
|---|---|
| array1 | The first range. |
| array2optional | More ranges, side by side. |
Example
CHOOSECOLS(range, col1, col2…) keeps only the columns you ask for, in any order. HSTACK places ranges side by side.
=HSTACK(D2:D6,A2:A6)
Common mistake
Excel 365 only. If ranges differ in height, the gaps fill with #N/A.
About Ads
This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.
Ads help us keep WebHerramientas free for everyone
Practice HSTACK
Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons
CHOOSECOLS and HSTACK
CHOOSECOLS(range, col1, col2…) keeps only the columns you ask for, in any order. HSTACK places ranges side by side.
In F2, show only the employee and their salary (columns 1 and 4).
| A | B | C | D | E | F | G | H | I | J | K | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Employee | Area | Role | Salary | |||||||
| 2 | Carmen | Sales | Manager | 42,000.00 | |||||||
| 3 | Jorge | IT | Analyst | 31,000.00 | |||||||
| 4 | Lucía | Finance | Accountant | 35,500.00 | |||||||
| 5 | Andrés | Sales | Executive | 22,000.00 | |||||||
| 6 | Paola | IT | Developer | 38,000.00 | |||||||
| 7 |
Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.
Frequently asked questions
- What is HSTACK called in Spanish?
- In Spanish Excel it is APILARH. The formula =HSTACK(D2:D6,A2:A6) is written =APILARH(D2:D6;A2:A6) (or with commas in Mexico).
- Why does HSTACK use semicolons in some Excel versions?
- It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
- What is the most common HSTACK mistake?
- Excel 365 only. If ranges differ in height, the gaps fill with #N/A.