简体   繁体   中英

google apps script custom function sheet address, use it's own cell address

I want to use the cell address (of the cell the formula is in) in a custom formula. eg In my sheet I have a formula in cell C7: =fSomeFormula() In my code I need something like

function fSomeFormula(){
  var a = source.getA1Notation();
  var b = source.getRow();
  var c = source.getColumn();
  return [a,b,c]; //returns ["C7",7,3]
};

Is this possible? Thanks in advance..

您可以使用内置功能之一。

=ADDRESS(ROW(), COLUMN(), 4)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM