import { split } from "lib/Array.cms"; function match(x, y, data) { for (i = 0; i < data.length; i++) { if ([x+i,y] != data[i]) { return false; } } return true; } findCells = split(InputBox("検索するデータを入力してください。"), ","); replaceCells = split(InputBox("置換するデータを入力してください。"), ","); if (findCells.length != replaceCells.length) { MessageBox("データの長さが異なります。"); return; } if (replaceCells.length == 0) { return; } for (y = 1; y <= Bottom; y++) { for (x = 1; x <= Right; x++) { if (match(x, y, findCells)) { for (i = 0; i < replaceCells.length; i++) { [x+i,y] = replaceCells[i]; } x += replaceCells.length - 1; } } }