描述

在文本字符串中用new_text替换old_text。

语法

SUBSTITUTE (text, old_text, new_text, [instance_num])

争论

Argument 描述 Required/Optional
Text The text or the reference to a cell containing text for which you want to substitute characters. Required
Old_text The text you want to replace. Required
New_text The text you want to replace old_text with. Required
Instance_num

指定要用new_text替换old_text的出现。

如果指定instance_num,则仅替换old_text的该。否则,文本中每次出现的old_text都将更改为new_text。

Optional

Notes

  • 当您要替换文本字符串中的特定文本时,请使用SUBSTITUTE。

  • 当您要替换文本字符串中特定位置出现的任何文本时,请使用REPLACE。

适用性

Excel 2007,Excel 2010,Excel 2013,Excel 2016

Example

SUBSTITUTE Function

参考链接

https://www.learnfk.com/javascript/advanced-excel-statistical-substitute-function.html