REPLACE ()
This function replaces a portion of text with a new text.
Best view in desktop mode.
A
|
B
|
C
|
D
|
E
|
F
|
G
|
|
1
|
Original Text
|
Start
Position |
Characters
To Replace |
New
Character |
Modified
Text |
||
2
|
ABCD1234
|
2
|
1
|
x
|
AxCD1234
|
=REPLACE(A2,B2,C2,D2)
|
|
3
|
ABCD1234
|
3
|
4
|
x
|
ABx34
|
=REPLACE(A3,B3,C3,D3)
|
|
4
|
ABCD1234
|
5
|
3
|
dear
|
ABCDdear4
|
=REPLACE(A4,B4,C4,D4)
|
|
5
|
ABCD1234
|
2
|
5
|
dear
|
Adear34
|
=REPLACE(A5,B5,C5,D5)
|
|
6
|
ABCD1234
|
Adear34
|
=REPLACE(A6,2,5,"dear")
|
||||
7
|
Criteria can be defined within function. Like row 6.
Syntax
=REPLACE (old_text,
start_text, num_chars, new_text)
Where
old_text =
old text to replace.
start_num = the
starting location in the text to search.
num_chars = the
number of characters to replace.
new_text = new
text to replace old text.
Formatting
No special
formatting is needed.
No comments:
Post a Comment