// ReplaceMultiLine.cms 2021.01.28 by あすかぜ // 選択範囲のみを置換します // 編集・再配布は自由です。 str1 = InputBoxMultiLine("検索文字列を入力してください"); if (str1 == "") { return; } str2 = InputBoxMultiLine("置換文字列を入力してください"); count = 0; for (y = 1; y <= Bottom; y++) { for (x = 1; x <= Right; x++) { if (pos([x,y], str1) > 0) { [x,y] = replace([x,y], str1, str2); count++; } } } MessageBox(count + " 個のセルを置換しました。");