I made function in the google sheet
function AVG_ZERO(input) {
return input.length
};
But length of array different If the range of numbers is located in a column, then it is considered correct If the range of numbers is located in a string, then the length is 1 Links to images:
CodePudding user response:
Issue:
If you pass a range of cells as an argument of a custom function, the argument will be treated by your custom function as a two-dimensional array of the cell's values, with the inner arrays being the individual rows. That is, the outer array length
will equal the number of rows in your range: 1 for B1:D1
and 3 for B1:B3
.