SUBSTITUTE - Substituting for Specified Text

  • Last update:  2023-07-25
  • Overview

    Grammar

    SUBSTITUTE(text, old_text, new_text, instance_num)

    Substitutes new_text for old_text in a text string.

    Parameter 1

    text

    Text string

    Parameter 2

    old_text

    Old text string you want to replace

    Parameter 3

    new_text

    New text string with which you want to replace old_text

    Parameter 4

    instance_num

    Specifies which instance of old_text you want to replace.

    • The SUBSTITUTE function is used to replace specific text in a text string.

    • The REPLACE function is used to replace any text in a specific location in a text string.

    Notes

    • Parameters 1, 2, and 3 can be of any type, and Parameter 4 is of the numeric type (that can be defaulted).

    • iconNote:
      Direct connect data does not support this function.

    Example

    For example, if you want to replace Cold in the Product name column with Flu, enter the formula SUBSTITUTE(Product name, "Cold", "Flu"), as shown in the following figure.

    SUBSTITUTE.png

    More examples:

    FormulaResultNotes
    SUBSTITUTE("data base","base","model")data model
    SUBSTITUTE("July 28, 2000","2","1",1)July 18, 2000
    SUBSTITUTE("July 28, 2000","2","1")July 18, 1000
    SUBSTITUTE("July 28, 2000","2","1",2)July 28, 1000


    Attachment List


    Theme: Advanced Data Analyis
    前の記事
    次の記事
    • いいね
    • 良くない
    • 閲覧しただけ

    フィードバック

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    9s后关闭

    反馈已提交

    网络繁忙