How do I use REPLACE in Excel?
Use REPLACE when you want to replace text by position. Enter Old text, Start position, Number of characters in that order, then add optional arguments when needed.
Replaces part of text based on position.
REPLACE(old_text, start_num, num_chars, new_text)old_text
RequiredEnter a text value (wrap with quotes when needed).
start_num
RequiredEnter a numeric value.
num_chars
RequiredEnter a numeric value.
new_text
RequiredEnter a text value (wrap with quotes when needed).
Use REPLACE to return the result with these settings (Old text: B2 (cell B2 (Name in column B)), Start position: 1, Number of characters: 2, New text: "XX").
| # | AEmployee ID | BName | CEmail | DPayment Amount | EAmount Text |
|---|---|---|---|---|---|
| 2 | E001 | Taro Tanaka | t.tanaka@example.com | 1200 | 1200 |
| 3 | E002 | Hanako Suzuki | h.suzuki@example.com | 980 | 980 |
| 4 | E003 | Ken Sato | k.sato@example.com | 2450 | 2450 |
| 5 | E004 | Aya Takahashi | a.takahashi@example.com | 3000 | 3000 |
| 6 | |||||
| 7 | |||||
| 8 |
How to Use (Formula)
=REPLACE(B2, 1, 2, "XX")Result
XXro Tanaka
Use REPLACE when you want to replace text by position. Enter Old text, Start position, Number of characters in that order, then add optional arguments when needed.
Use the "Start Function Practice" button to jump straight into REPLACE drills.
The main arguments are Old text, Start position, Number of characters, New text. Enter them in order.