---
schema_version: "1"
id: b8b2a91c132012dd1712b89d6d3eaccb85d5aec5543fe99b065b3ee6c2e3aba2
title: SUBSTITUTE
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/customize_functions_substitute.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.customize_functions_substitute.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 692f7f6f8d95d09f87f86beb0b67fd4ae918ac012d6aa92628f8734eb57b3253
description: Substitutes new text for old text in a text string.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# 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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_example.png)

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.