Skip to content

Instantly share code, notes, and snippets.

@iTrauco
Forked from oyakudachi/if else text.js
Created August 16, 2018 04:57
Show Gist options
  • Save iTrauco/9c90f4956369ab1178656405e4d78e8e to your computer and use it in GitHub Desktop.
Save iTrauco/9c90f4956369ab1178656405e4d78e8e to your computer and use it in GitHub Desktop.
Google apps script
if(rng[i]=="赤テキスト"){
sht.getRange(i+4,4).setValue('赤文字').setHorizontalAlignment("center").setFontColor("red");
}else if(rng[i]=="赤テキスト黄色塗り"){
sht.getRange(i+4,4).setValue('赤&黄色').setHorizontalAlignment("center").setFontColor("red").setBackground(color);
}else{
sht.getRange(i+4,4).setValue('青文字').setHorizontalAlignment("center").setFontColor("blue");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment