复制&粘贴值

时间:2017-06-17 14:10:46

标签: google-apps-script google-sheets

我试图在Google表格中为我所属的游戏小组创建一个简单的骰子滚轮。

到目前为止我已经知道了。

function RollDice20() {
  SpreadsheetApp.getActiveSheet().getRange('intDiceRollMain20').setValue('=RANDBETWEEN(1,20)');
}

麻烦在于,每次细胞改变后RANDBETWEEN都会改变。我希望能够再做两个步骤: -

  1. 复制intDiceRollMain20的值。
  2. 仅将intDiceRollMain20的值粘贴到intDiceRollFixed20中。
  3. 清除intDiceRollMain20的内容。
  4. 有人能帮忙吗?

0 个答案:

没有答案
相关问题