top of page

SUBSTITUTE FUNCTION

The SUBSTITUTE function enables us to substitute one or more characters in a text expression or cell with another character or set of characters.

The syntax of the function is: =SUBSTITUTE(text,old_text,new_text,[instance_num])

  • text – The text in which we want to perform the substitution. It could be a single character, word, sentence or reference to another cell

  • old_text – What we are looking for to replace. Could be a single character or multiple.

  • new_text – What we wish to insert into the text as a replacement. Could be a single character or multiple.

  • [instance_num] – Optional. If a certain character/word appears multiple times in our text and we wish to replace it only in a specific instance, we can use this argument. If we don’t use it, all instances will be replaced with the new_text. 

IMPORTANTWhen using the SUBSTITUTE function, remember to enclose any actual text you enter in the function's arguments with quotation marks. Additionally, keep in mind that the SUBSTITUTE function is case-sensitive, so it distinguishes between lowercase and uppercase letters. For example, substituting "f" is different from substituting "F". Pay attention to the correct capitalization when using this function.​

bottom of page