Posts

Showing posts with the label Replacing text with other text

Replacing text with other text

Replacing text with other text In some situations, you may need a formula to replace a part of a text string with some other text. For example, you may import data that contains asterisks, and you may need to convert the asterisks to some other character. You could use Excel’s Home➜Editing➜Find & Select➜Replace command to make the replacement. If you prefer a formula-based solution, you can take advantage of either of two functions:  SUBSTITUTE replaces specific text in a string. Use this function when you know the character(s) that you want to replace but not the position.  REPLACE replaces text that occurs in a specific location within a string. Use this function when you know the position of the text that you want to replace but not the actual text. The following formula uses the SUBSTITUTE function to replace 2010 with 2011 in the string 2010 Budget. The formula returns 2011 Budget. =SUBSTITUTE(“2010 Budget”,”2010”,”2011”) The following formula uses the SUBSTITUTE fun...