=SUBSTITUTE(text,old_text,new_text,[instance_num])
Text argument [Required] is used to give the cell reference in which value to be searched
old_text argument [Required], is used to give the specific text or cell reference, to be substituted
new_text argument [Required], is used to give the specific text or cell reference that you want to substitute in old_text
instance_num argument [Optional], is used to give the occurrence number that you want to substitute
Here we have an example, where “Column A” has various values and are required to substitute year “2018” with “2019”. Output of the function returns value in ”Column B” and explanation is also provided.
We will be following SUBSTITUTE function as follows:
– text argument value “A2” shows the cell reference in which “2018” is to be searched
– old_text argument value “2018” shows that “2018” should be replaced in “A2” cell
– new_text argument value “2019” shows the substituted value
– Value in cell “B2” shows that “2018” in cell “A2” is substituted with “2019”
– Value in cell “B4” shows that cell “A2” did not have “2018” that is why text is not substituted and function returns original value of cell “A2” as output
Here we have another example, where “2018” should be replaced with “2019” but ONLY SECOND OCCCURRENCE. Output of the function returns value in ”Column B” and explanation is also provided.
We will be following SUBSTITUTE function as follows:
– text argument value “A2” shows the cell reference from which “2018” is to be searched
– old_text argument value “2018” shows that “2018” should be searched in “A2” cell
– new_text argument value “2019” shows the substituted value
– instance_num argument value “2” shows only 2nd occurrence to be substituted and there should no impact on other values.
– Value in cell “B2” shows that “2018” in cell “A2” is substituted with “2019” but only 2nd occurrence and there is no impact on
– Spaces available in a string is counted as characters
-Value in instance_num argument should NOT be negative
– If value in old_text argument is not searched in text argument cell, function will return value of text argument cell
– If cell reference or parameters are not correctly provided in the function, then it will give output as “#VALUE!” (Error).
– Function should give output in “General” format, however if output is not as per the desired format then we need to change the cell format to “GENERAL”.
Hope you learnt this Function,
Don’t forget to leave your valuable comments!
If you liked this article and want to learn more similar tricks, please Subscribe us or follow us on Social Media by clicking below buttons:
UPPER function is used for changing the text/string to UPPER case in Microsoft Excel. The output of the function returns value in new cell.
This tutorial teaches the basics of correlation in Excel. It shows how to find a correlation coefficient, make a correlation matrix, and understand the results.
Correlation is one of the easiest calculations you can do in Excel. Even though it’s easy, it helps a lot in understanding how two or more things are related. Excel has all the tools you need to do a correlation analysis—you just need to know how to use them
This article unveils the magic of Power Query, a built-in Excel tool that simplifies data organization. Learn how to sort by single or multiple columns, create layered sorts for complex needs, and even reverse your data order entirely. Power Query puts you in control, transforming your data into a well-structured format for effortless analysis.
This quick tutorial explains the basics of external references in Excel and shows how to reference another sheet or workbook in your formulas.
Filter in Excel is an essential tool that helps to display relevant data. It eliminates the irrelevant entries temporarily from the view. This tool filters data according to the criteria to help analyze the critical data points
Conditional Formatting helps to easily identify the usual and unusual numbers/ conditions, creating interactive visualization by means of Highlight Cells by Rules, Top/Bottom Rules, Data Bars, Color Scales and Icon Sets.