java mwcellarray,将数组传递给包含在ArrayFormula中的自定义函数?

我有一个电子表格,其中包含使用合并单元格的列,以便进行格式化 . 我正在尝试创建镜像第一组列的列,但在所有受影响的行上使用合并的单元格值 . 由于我在网上找到的自定义功能,我可以做到这一点 . 我不能做的就是在arrayformula中包含这个,我不知道为什么 .

自定义功能是:

/**

* Takes into account merged cells and returns the value of the merged cell

* for all the cells within the merged range, rother than just the top left

* cell of the merged range.

*

* Copied from https://webapps.stackexchange.com/questions/110277/how-do-i-reference-the-values-of-merged-cells-in-formulas

*

* Used by Patrick Duncan. - 7 May 2018

*/

function cellVal(cellAddress) {

var cell = SpreadsheetApp.getActiveSheet().getRange(cellAddress);

return (cell.isPartOfMerge() ? cell.getMergedRanges()[0].getCell(1, 1) : cell).getValue();

}

没有Arrayformula的公式是:

= cellVal2(index(address(row(),5,4)))

而我正在尝试的是:

= arrayformula(cellVal2(index(address(row(E3:E),5,4))))

知道我在这里做错了吗?

干杯,

帕特里克

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值