Cleaning imported data
CONCAT function: join cells and ranges when no separator is needed
Assemble compact tracking codes across cells or whole ranges with CONCAT, and know when delimiter-aware TEXTJOIN is the safer choice.
Build a compact lot code from four adjacent columns
Columns A through D store Plant ("BG"), Line ("02"), Shift ("B"), and Batch (19). Joining the range A2:D2 directly without separators produces the barcode string "BG02B19".
| Plant (A) | Line (B) | Shift (C) | Batch (D) | CONCAT(A2:D2) |
|---|---|---|---|---|
| BG | 02 | B | 19 | BG02B19 |
Pass a range directly into CONCAT
Unlike legacy CONCATENATE (which required clicking each cell one by one: A2, B2, C2, D2), =CONCAT(A2:D2) accepts a full range and joins every cell end-to-end.
=CONCAT(A2:D2)Empty cells add nothing—and CONCAT inserts no delimiters
If C2 (Shift) is cleared, =CONCAT(A2:D2) simply returns "BG0219". Whenever you DO want hyphens or commas between parts, prefer TEXTJOIN("-", TRUE, A2:D2) over CONCAT so you do not have to type "-" between every cell.
=CONCAT(A2,"-",B2,"-",D2)Try the example
Use the original values or change them to test your understanding.