ExcelFlux

TEXTJOIN function

Combines the text from multiple ranges and/or strings.

Text · Excel 2019+

Where can you use it?

Data preparation and reporting teams. Use this group to clean, split or reformat IDs, names and descriptions before using them in reports.

Scenario in the workbook

Join components with a delimiter. TRUE skips empty components.

A worked example from the workbook

RowABC
6ValueSecond valueThird value
7INV042XUK
8PO—US
9CN88Z—
Record 1
=TEXTJOIN("-",TRUE,A7:C7)

Expected resultINV-042X-UK

See the inputs and instructions for all 3 examples

Copyable formulas

English Excel · en-US
=TEXTJOIN("-",TRUE,"INV","042")
Turkish Excel · tr-TR
=METİNBİRLEŞTİR("-";DOĞRU;"INV";"042")

Expected result

“INV-042”

Worked examples

Join components with a delimiter. TRUE skips empty components.

Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.

Row A B C
6 Value Second value Third value
7 INV 042X UK
8 PO — US
9 CN 88Z —
Case Formula Expected result
Record 1 =TEXTJOIN("-",TRUE,A7:C7) INV-042X-UK
Record 2 =TEXTJOIN("-",TRUE,A8:C8) PO-US
Record 3 =TEXTJOIN("-",TRUE,A9:C9) CN-88Z
Microsoft Excel reference