Excel tutorial
/

Functions

Intermediate

Excel TEXTJOIN function: combine a list into one cell with a delimiter

Use TEXTJOIN to join a range with commas or “; ”, skip empty cells, and build unique or conditional lists in one cell — with examples.

TEXTJOIN joins a whole range into one string and puts the delimiter of your choice between the values: a comma, a semicolon, a dash or a line break.

Compared to CONCAT and &, it has two advantages: you type the delimiter only once, and it can skip empty cells. If an address has no district, you won’t get “Samarkand, , Registan” with a double comma.

Where it helps: all employees of a branch in one cell, several phone numbers of a customer, an e-mail list for a mailing, an address built from parts. Available in Excel 2019, 2021 and 365.

Книга1 - Excel
—☐✕
E3fx=ОБЪЕДИНИТЬ(", ";ИСТИНА;A3:D3)
ABCDEF
1CityDistrictStreetHouseAddress
2TashkentChilanzarBunyodkor St12Tashkent, Chilanzar, Bunyodkor St, 12
3SamarkandRegistan St5Samarkand, Registan St, 5
4Bukhara7Bukhara, 7
5
Готово
Empty cells were skipped — no extra commas

Syntax

=ОБЪЕДИНИТЬ(delimiter; ignore_empty; text1; [text2]; …)

  • delimiter — in quotes: ", " (comma and space), "; ", " - ".
  • ignore_empty — TRUE skips empty cells; FALSE adds a delimiter for them too.
  • text1, … — the ranges or values to join. You can pass several ranges: A2:A6, C2:C6.

In practice you almost always write TRUE.

Building an address from parts

1

Select the result cell — E2.

2

Формулы → Текстовые → choose TEXTJOIN.

Книга1 - Excel
—☐✕
ФайлГлавнаяВставкаРазметка страницыФормулыДанныеРецензированиеВидСправка
Вставить функциюАвтосуммаФинансовыеЛогическиеТекстовыеДата и времяСсылки и массивыМатематические
Библиотека функций
Диспетчер имён
Определённые имена
E2fx
ABCDEF
1CityDistrictStreetHouseAddress
2TashkentChilanzarBunyodkor St12
3
4
5
Готово

3

Enter ", " in Delimiter and TRUE in Ignore_empty. Click into Text1 and select A2:D2 with the mouse. Click OK.

Книга1 - Excel
—☐✕
E2fx=ОБЪЕДИНИТЬ(", ";ИСТИНА;A2:D2)
ABCDEF
1CityDistrictStreetHouseAddress
2TashkentChilanzarBunyodkor St12Tashkent, Chilanzar, Bunyodkor St, 12
3
4
5
ГотовоКоличество: 4

4

Fill the formula down. Even rows without a district or street get a tidy address.

Книга1 - Excel
—☐✕
E2fx=ОБЪЕДИНИТЬ(", ";ИСТИНА;A2:D2)
ABCDEF
1CityDistrictStreetHouseAddress
2TashkentChilanzarBunyodkor St12Tashkent, Chilanzar, Bunyodkor St, 12
3SamarkandRegistan St5Samarkand, Registan St, 51
4
5
ГотовоКоличество: 2
Книга1 - Excel
—☐✕
E3fx=ОБЪЕДИНИТЬ("; ";ЛОЖЬ;B3:D3)
ABCDEF
1CustomerPhone 1Phone 2Phone 3All phones
2Aziz90-123-45-6793-555-12-3490-123-45-67; 93-555-12-341
3Aziz90-123-45-6793-555-12-3490-123-45-67; ; 93-555-12-342
4
5
Готово
Example 1: (1) TRUE — empty C2 was skipped; (2) FALSE — a “; ” was added for the empty cell too
Книга1 - Excel
—☐✕
D4fx=ОБЪЕДИНИТЬ(", ";ИСТИНА;УНИК(B2:B6))
ABCDE
1EmployeeBranchResult
2AzizTashkentAziz, Dilnoza, Javohir, Malika, Sardor1
3DilnozaSamarkand
4JavohirTashkentTashkent, Samarkand, Bukhara2
5MalikaBukhara
6SardorSamarkand
7
Готово
Example 2: (1) a whole column in one cell; (2) with UNIQUE — branches without duplicates (Excel 2021/365)

Pro level: a list that meets a condition

The most powerful combo is TEXTJOIN + FILTER (Excel 2021/365). For example, only the Tashkent branch employees in one cell:

=ОБЪЕДИНИТЬ(", ";ИСТИНА;ФИЛЬТР(A2:A6;B2:B6="Tashkent"))

Put the condition into its own cell (B2:B6=F1) and the list updates as soon as you change the branch — a mini report.

Two more tricks:

  • Excel 2019 has no FILTER. Use an array formula instead: =ОБЪЕДИНИТЬ(", ";ИСТИНА;ЕСЛИ(B2:B6="Tashkent";A2:A6;"")), confirmed with Ctrl + Shift + Enter.
  • Each value on its own line. Use CHAR(10) as the delimiter and turn on Перенос текста: =ОБЪЕДИНИТЬ(CHAR(10);ИСТИНА;A2:A6).
Книга1 - Excel
—☐✕
fx
ABCDE
1EmployeeBranchTashkent branch
2AzizTashkentAziz, Javohir, Sardor
3DilnozaSamarkand
4JavohirTashkent
5MalikaBukhara
6SardorTashkent
7
Готово
D2: =TEXTJOIN(", ",TRUE,FILTER(A2:A6,B2:B6="Tashkent")) — only the names that match

Try it in the simulator

In D2 join all employees with commas: =ОБЪЕДИНИТЬ(", ";ИСТИНА;A2:A6). Then delete the name in A4 and check that no extra comma appears.

Книга1 - Excel
—☐✕
Буфер обмена
Шрифт
Выравнивание
Число
Стили
Ячейки
Редактирование
✕✓fx
ABCDEFGHIJKLMNOPQRSTUVWX
1EmployeeBranchAll employees
2AzizTashkent
3DilnozaSamarkand
4JavohirTashkent
5MalikaBukhara
6SardorSamarkand
7
8
9
10
Лист1
Готово

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

115 / 154