Advanced-excel-functions-advanced-excel-statistical-substitute-function

提供:Dev Guides
移動先:案内検索

統計-SUBSTITUTE関数

説明

テキスト文字列のold_textをnew_textに置き換えます。

構文

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

引数

Argument Description 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

Specifies which occurrence of old_text you want to replace with new_text.

instance_numを指定すると、old_textのそのインスタンスのみが置き換えられます。 それ以外の場合、テキスト内のold_textのすべての出現はnew_textに変更されます。

Optional

ノート

  • テキスト文字列内の特定のテキストを置き換える場合は、SUBSTITUTEを使用します。
  • テキスト文字列の特定の場所にあるテキストを置き換える場合は、REPLACEを使用します。 .

適用範囲

Excel 2007、Excel 2010、Excel 2013、Excel 2016

SUBSTITUTE関数