SUBSTITUTE Formula in MS Excel
The SUBSTITUTE formula in MS Excel replaces specific characters in a text string with new characters.
The syntax of the SUBSTITUTE formula is as follows:
SUBSTITUTE(text, old_text, new_text, [occurrence])
Where:
- text: The original text string.
- old_text: The text to be replaced.
- new_text: The text to replace the old text.
- [occurrence]: Optional. The instance of old_text to replace, with the first instance being 1, the second instance being 2, and so on. If this argument is not provided, all instances of old_text will be replaced.
For example, the following formula would replace all instances of the text "apple" in the value in cell A1 with the text "banana":
=SUBSTITUTE(A1, "apple", "banana")
The SUBSTITUTE formula is useful for making specific changes to a text string, such as replacing specific words, correcting spelling errors, or removing unwanted characters.
No comments:
Post a Comment