Saturday, November 23, 2019

SUBSTITUTE (Substitutes new text for old text in a text string)
















This function replaces a specified piece of text with a different piece of text.
It can either replace all occurrences of the text, or a specific instance.
The function is case sensitive.
Syntax
=SUBSTITUTE(OriginalText,TextToRemove,TextToInsert,InstanceToUse)
The InstanceToUse is optional, if it is omitted all instances will be substituted.
Formatting
No special formatting is needed.
Note
To cope with upper or lower case in the substitution you can use other text functions such as =UPPER(), =LOWER() or =PROPER() to ensure that the substitution will take place.


Table 1 shows how differing text cases alter the result of the substitution.
















Table 2 shows how the =PROPER() function has been used to take account of the mixed cases.


No comments:

Post a Comment