Home : SUBSTITUTE
Q11598 - INFO: SUBSTITUTE

SUBSTITUTE (Primitive Spread Function) substitutes a new string for specified characters in an existing string.

SYNTAX:

SUBSTITUTE(Text, Old_text, New_text, Instance)

REMARKS:

Arguments are as follows:

Argument Description 
Text The string or a reference to a cell containing the string in which you want to replace characters. 
Old_text String to be replaced. 
New_text New string to use instead of existing string. 
Instance (Optional) Specifies which occurrence of the existing string to replace. If you specify a value, only that instance of the existing string is replaced. Otherwise, every occurrence of the existing string is replaced in the text specified by the Text argument. 


Use the SUBSTITUTE function to replace specific text with other text. Use the REPLACE function to replace a specific number of characters in a specific location with other characters. 

EXAMPLES:

SUBSTITUTE("Sale Trend","Sale","Cost")" equals Cost Trend
SUBSTITUTE("Feb 1, 1991"","1","2", 3) equals Feb 1, 1992

Related Articles
Q11534 - INFO: FIND
Q11582 - INFO: REPLACE

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 8/28/2008 11:46 AM.
Last Modified on 10/1/2010 12:39 PM.
Last Modified by Scott Dorner.
Article has been viewed 3700 times.
Rated 0 out of 10 based on 0 votes.
Print Article
Email Article