SUBSTITUTE
Substitutes new text for old text in a text string.
TextMost UsedText CleaningText Processing
What it does
Replaces occurrences of old text with new text in a string.
Syntax
SUBSTITUTE(text, old_text, new_text, [instance_num])
Arguments
text(text) β Original text.old_text(text) β Text to replace.new_text(text) β Replacement text.
Examples
Replace dashes with spaces
Convert A2 from dashed to spaced.
FORMULA
=SUBSTITUTE(A2,"-"," ")
RESULT
INV 1042
SAMPLE DATA
| A | |
|---|---|
| 1 | Code |
| 2 | INV-1042 |
| 3 | PO-0088 |