I want to create a function which takes in a range... something like:
function myFunction(range) {
var firstColumn = range.getColumn();
// loop over the range
}
A cell would reference it using:
=myFunction(A1:A4)
The problem is that when I try doing this, the parameter seems like it is only passing the values to the function. Thus, I cannot use any of the Range methods such as getColumn(). When I attempt to do so, it gives the following error:
error: TypeError: Cannot find function getColumn in object 1,2,3.
How can I send an actual range rather than just the values to one of my custom functions?