REPLACE function. Replace specified character position & number of characters with specified string.(Microsoft Excel)
Replace specified character position & number of characters with specified string.
Contents
How it works
=REPLACE(Old_text,Start_num,Num_chars,New_text)
Name | Omission | Explanation |
---|---|---|
Old_text | Required argument. | Target Text. |
Start_num | Required argument. | Position to start replacement (first position is 1). |
Num_chars | Required argument. | The position at which the substitution will end. The number of characters from the Start_num. If 0 is specified, the operation is only insertion without replacement. If a number greater than a string is specified, all characters after the Start_num will be replaced. |
New_text | Required argument. | Replaced string. |
Example Results
Enumerate the various cases.
- Normal case.
- The start position exceeds the number of strings.
- The start position is 0.
- The number of characters is 0.
Spill
If any argument is a cell range, the result of the function will be Spill.
Difference from REPLACE function
It is similar to the REPLACE function, which also replaces text, but differs in the selection of replacement locations.
Function | Replacement location |
---|---|
SUBSTITUTE | Text. |
REPLACE | Start position and number of characters. |
---
Discussion
New Comments
No comments yet. Be the first one!