Excel Function

REPLACE

Replaces part of text based on position.

REPLACE(old_text, start_num, num_chars, new_text)

Arguments

old_text

Required

Enter a text value (wrap with quotes when needed).

start_num

Required

Enter a numeric value.

num_chars

Required

Enter a numeric value.

new_text

Required

Enter a text value (wrap with quotes when needed).

Practice Preview

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").

Example Table

#
AEmployee ID
BName
CEmail
DPayment Amount
EAmount Text
2E001Taro Tanakat.tanaka@example.com12001200
3E002Hanako Suzukih.suzuki@example.com980980
4E003Ken Satok.sato@example.com24502450
5E004Aya Takahashia.takahashi@example.com30003000
6
7
8

How to Use (Formula)

=REPLACE(B2, 1, 2, "XX")

Result

XXro Tanaka

Practice This Function

REPLACE FAQ

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.

Where can I practice REPLACE?

Use the "Start Function Practice" button to jump straight into REPLACE drills.

What arguments does REPLACE use?

The main arguments are Old text, Start position, Number of characters, New text. Enter them in order.