Joining text with TEXTJOIN
1 / 5
Join each address into one line, with a comma and a space between the parts.
keyboard Typing formulas is easiest on a computer with a keyboard.
A1
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Line 1 | Line 2 | Town | County | Full address | |
| 2 | 35 Station Road | Exeter | Devon | |||
| 3 | 69 High Street | Unit 19 | Chester | Cheshire | ||
| 4 | 41 Station Road | Flat 11 | York | North Yorkshire | ||
| 5 | 83 Green Lane | Flat 5 | Bath | Somerset | ||
| 6 | 93 Park Avenue | Truro | Cornwall | |||
| 7 | 107 Station Road | Lincoln | Lincolnshire | |||
| 8 | ||||||
| 9 | ||||||
| 10 | ||||||
| 11 | ||||||
| 12 |
parts
one line
Type to enter a value or a formula starting with =. F2 edits, F4 adds $ to a reference.
How TEXTJOIN and CONCAT works
What does
TEXTJOINdo?TEXTJOINjoins a range of cells into one piece of text, with a separator between each part:=TEXTJOIN("," ,TRUE, A2:D2) What are its three parts?
- The separator, in double quotes:
", "puts a comma and a space between the parts. TRUEorFALSE:TRUEskips empty cells,FALSEkeeps them.- The cells to join: a range such as
A2:D2, or several cells and ranges separated by commas.
- The separator, in double quotes:
Why not just use &?
=A2&", "&B2&", "&C2works when every cell is filled in. When one is empty, you get two commas in a row: "12 Mill Road, , York".TEXTJOINwithTRUEleaves the gap out. It is also much shorter when there are many cells to join.What about
CONCAT?CONCAT(A2:D2)joins a range too, but with no separator and no way to skip empty cells. It replaces the olderCONCATENATE.
Know someone fighting with a spreadsheet? Send them this page.