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]; …)

ArgumentWhat it is
array1The first range.
array2optionalMore 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.

Advertising
Loading ad...

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.

Example=CHOOSECOLS(A2:D6,1,4)ELEGIRCOLS = CHOOSECOLSAPILARH = HSTACK
Step 1/2

In F2, show only the employee and their salary (columns 1 and 4).

F2
ABCDEFGHIJK
1EmployeeAreaRoleSalary
2CarmenSalesManager42,000.00
3JorgeITAnalyst31,000.00
4LucíaFinanceAccountant35,500.00
5AndrésSalesExecutive22,000.00
6PaolaITDeveloper38,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.