2

I want to be able to put my variable row into the

.setValue("=SUM(B54:BA54)")

Actually I need the value of row to replace B54:B54. I'm looking for something like

.setValue("=SUM(B+row+:BA+row)")

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)");
Rubén
  • 34,714
  • 9
  • 70
  • 166

1 Answers1

2
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.

ericw31415
  • 415
  • 6
  • 17