I am trying to create custom function in google sheets, where the function returns the reference of whatever cell the active user is in.
I had a lot of issues with Oauth permissions etc, but eventually got everything worked out by just using this code referenced here:
https://stackoverflow.com/a/30814944/19598411
/**
* A function that gets the current selection, in A1Notation.
*
* @customfunction
*/
function SELECTED_RANGE() {
return SpreadsheetApp.getActive().getActiveRange().getA1Notation();
}
What occurs is that the function does not update due to googles caching behaviour as Mogsdad references, and Henrique explains here: https://stackoverflow.com/a/9023954/19598411
I've tried to solutions referenced in this thread without any success.
Is there any way of creating what I'm trying to achieve?
Thanks.