0
votes

I have google spreadsheet and a function for it to calculate some values basing on first 3 cells in a row.

My problem is that this function returns multiple values which shold be placed in multiple cells in current row.

function test(arg1, arg2, arg3) {
  return [arg1 + 1, arg2 + 1, arg3 + 1];
}

For example. How i tell it to put values from array to different cells?

1
Read setValues() documentation - TheMaster

1 Answers

2
votes

Assuming that the question is about a custom function, the following function will return a 1 row x 3 columns array

function test(arg1, arg2, arg3) {
  return [[arg1 + 1, arg2 + 1, arg3 + 1]];
}