key = InputBox("指定文字を入力してください。"); newString = InputBox("追加文字を入力してください。"); for (y = 1; y <= Bottom; y++) { count = 0; for (x = 1; x <= Right; x++) { if ([x,y] == key) { count++; } } for (x = Right; count > 0; x--) { [x+count,y] = [x,y]; if ([x,y] == key) { count--; [x+count,y] = newString; } } }