SpreadsheetApp如何在公式中使用变量 [英] SpreadsheetApp how to use variable inside formula
本文介绍了SpreadsheetApp如何在公式中使用变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望能够将我的变量行放入
I want to be able to put my variable row into the
.setValue("=SUM(B54:BA54)")
实际上,我需要row的值来替换B54:B54
.我正在寻找类似的东西
Actually I need the value of row to replace B54:B54
. I'm looking for something like
.setValue("=SUM(B+row+:BA+row)")
因此,如果row = 50
,setValue
会将=SUM(B50:BA50)
放入单元格
So if row = 50
the setValue
will put =SUM(B50:BA50)
in the cell
var text3 = result3.getResponseText();
var row = parseInt(text3);
activeSheet.getRange(row+3,55).setValue("=SUM(B54:BA54)");
推荐答案
var text3 = result3.getResponseText();
var row = parseInt(text3);
activeSheet.getRange(row+3,55).setValue("=SUM(B" + row + ":BA" + row + ")");
使用串联应该可以像您想要的那样工作.
using concatenation should work like you want it.
这篇关于SpreadsheetApp如何在公式中使用变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文