1. Replace Characters or Line Breaks With SUBSTITUTE
Use SUBSTITUTE(text, old_text, new_text) to swap specific characters—such as replacing hyphens with spaces or stripping line breaks (CHAR(10)) from pasted cells:
=SUBSTITUTE(A2, CHAR(10), ", ")
2. Check Cell Length With LEN
Use LEN(cell) to count total characters (including spaces) when verifying ID lengths, SKU codes, or text limits:
=LEN(A2)
Worked Example: SUBSTITUTE & LEN
| Cell A2 (Input) | =SUBSTITUTE(A2, "-", "") |
=LEN(A2) |
|---|---|---|
INV-1001 |
INV1001 | 8 |
SKU-45 |
SKU45 | 6 |