Skip to content

Instantly share code, notes, and snippets.

@akifumi-kamata
Created February 12, 2015 01:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akifumi-kamata/18cfdc879592bb2e021c to your computer and use it in GitHub Desktop.
Save akifumi-kamata/18cfdc879592bb2e021c to your computer and use it in GitHub Desktop.
GAS 選択範囲のセル内の文字を結合
function str_combine(param1) {
var delimiter = " ";//半角スペース
var str = "" + param1;
var ary = str.split(",");
var value = "";
for(var i=0; i<ary.length; i++){
if(value != ''){
value = value + delimiter + ary[i];
} else{
value = ary[i];
}
}
return value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment