I'm trying to get a reference to the calling cell's range in a Google Sheets custom function.

For example:

function MyAddress() {
    callingRange = // get calling cell reference here
    return callingRange.getA1Notation();

getActiveCell() isn't guaranteed to work because calculation doesn't necessarily occur while the calling cell is active (I could be wrong about this, but can't find confirmation). Any suggestions?

  • Welcome. Please add a brief description of your search/research efforts as is suggested in How to Ask. (we already have several questions/answer that use getActiveRange() but I'm not sure that there are about getActiveCell()) – Rubén Feb 2 '20 at 21:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.