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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | City | District | Street | House | Address | |
| 2 | Tashkent | Chilanzar | Bunyodkor St | 12 | Tashkent, Chilanzar, Bunyodkor St, 12 | |
| 3 | Samarkand | Registan St | 5 | Samarkand, Registan St, 5 | ||
| 4 | Bukhara | 7 | Bukhara, 7 | |||
| 5 |
Syntax
=ОБЪЕДИНИТЬ(delimiter; ignore_empty; text1; [text2]; …)
- delimiter — in quotes:
", "(comma and space),"; "," - ". - ignore_empty —
TRUEskips empty cells;FALSEadds 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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | City | District | Street | House | Address | |
| 2 | Tashkent | Chilanzar | Bunyodkor St | 12 | ||
| 3 | ||||||
| 4 | ||||||
| 5 |
3
Enter ", " in Delimiter and TRUE in Ignore_empty. Click into Text1 and select A2:D2 with the mouse. Click OK.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | City | District | Street | House | Address | |
| 2 | Tashkent | Chilanzar | Bunyodkor St | 12 | Tashkent, Chilanzar, Bunyodkor St, 12 | |
| 3 | ||||||
| 4 | ||||||
| 5 |
4
Fill the formula down. Even rows without a district or street get a tidy address.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | City | District | Street | House | Address | |
| 2 | Tashkent | Chilanzar | Bunyodkor St | 12 | Tashkent, Chilanzar, Bunyodkor St, 12 | |
| 3 | Samarkand | Registan St | 5 | Samarkand, Registan St, 51 | ||
| 4 | ||||||
| 5 |
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Customer | Phone 1 | Phone 2 | Phone 3 | All phones | |
| 2 | Aziz | 90-123-45-67 | 93-555-12-34 | 90-123-45-67; 93-555-12-341 | ||
| 3 | Aziz | 90-123-45-67 | 93-555-12-34 | 90-123-45-67; ; 93-555-12-342 | ||
| 4 | ||||||
| 5 |
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Employee | Branch | Result | ||
| 2 | Aziz | Tashkent | Aziz, Dilnoza, Javohir, Malika, Sardor1 | ||
| 3 | Dilnoza | Samarkand | |||
| 4 | Javohir | Tashkent | Tashkent, Samarkand, Bukhara2 | ||
| 5 | Malika | Bukhara | |||
| 6 | Sardor | Samarkand | |||
| 7 |
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).
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Employee | Branch | Tashkent branch | ||
| 2 | Aziz | Tashkent | Aziz, Javohir, Sardor | ||
| 3 | Dilnoza | Samarkand | |||
| 4 | Javohir | Tashkent | |||
| 5 | Malika | Bukhara | |||
| 6 | Sardor | Tashkent | |||
| 7 |
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.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Employee | Branch | All employees | |||||||||||||||||||||
| 2 | Aziz | Tashkent | ||||||||||||||||||||||
| 3 | Dilnoza | Samarkand | ||||||||||||||||||||||
| 4 | Javohir | Tashkent | ||||||||||||||||||||||
| 5 | Malika | Bukhara | ||||||||||||||||||||||
| 6 | Sardor | Samarkand | ||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.