Loading
Extend Salesforce with Clicks, Not Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          SUBSTITUTE

          SUBSTITUTE

          Substitutes new text for old text in a text string.

          Use

          SUBSTITUTE(text, old_text, new_text) and replace text with the field or value for which you want to substitute values, old_text with the text you want replaced, and new_text with the text you want to replace the old_text

          .

          Tips

          • Each term provided in quotes is case-sensitive.
          • If the old_text appears more than one time, each occurrence is replaced with the new_text value provided, even when it results in duplicates.
          String Example
          String Example

          SUBSTITUTE(Name, "Coupon", "Discount") returns the name of an opportunity that contains the term “Coupon” with the opportunity name plus “Discount” wherever the term “Coupon” existed.

          SUBSTITUTE(Email, LEFT(Email, FIND("@", Email)), "www.") finds the location of the @ sign in a person's email address to determine the length of text to replace with a “www.” as a means of deriving their website address.

           
          Loading
          Salesforce Help | Article