Swap one piece of text for another inside a cell.
Copy this formula
=SUBSTITUTE(A2, "old", "new")SUBSTITUTE replaces every occurrence of the old text with new text. Add a fourth argument to replace only the n-th occurrence. Use it to fix codes, clean separators, or standardize labels.
=SUBSTITUTE("2026-01", "-", "/")→2026/01Swaps the dash for a slash.
Replace by position
=REPLACE(A2, 1, 3, "XXX")REPLACE swaps characters at a fixed position.
Use SUBSTITUTE when you know the text to swap; use REPLACE when you know the position and length.
Need a formula for your own data?
Describe what you want in plain language and let ExcelGPT write, explain, and verify the formula — free to start, no plugin.