
TextLevel: IntermediateAvailable in: Excel 2007+
In this article
- Syntax
- Examples
- Example 1
- Related functions
REPLACE swaps characters at a given position — useful for masking.
Syntax
=REPLACE(old_text, start_num, num_chars, new_text)
| Argument |
What it means |
start_num |
First character to replace. |
num_chars |
How many to replace. |
Examples
Example 1
=REPLACE(A2, 1, 6, "XXXXXX")
Mask the first six digits of a 10-digit mobile number.
SUBSTITUTE · MID
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
✨ Ask AI about this articleStuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong