替换 Google Sheet 中 Countifs 公式中的间接

问题描述 投票:0回答:1

我正在尝试找出一种方法将所有这些

indirect
替换为这个公式:

={
"𝒇x"; 
MAP($A9:$A; LAMBDA(x; IF(AND(x <> ""; index(AL:AL; ROW(x)) <> "");
    IFERROR(
        (COUNTIFS(indirect("DY"&ROW(x)&":"&ROW(x)); "P"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(indirect("DY"&ROW(x)&":"&ROW(x)); "D"; $DY$6:$6; $AL$6; $DY$5:$5; "H")) / 
        (COUNTIFS(indirect("DY"&ROW(x)&":"&ROW(x)); "P"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(indirect("DY"&ROW(x)&":"&ROW(x)); "D"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(indirect("DY"&ROW(x)&":"&ROW(x)); "I"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(indirect("DY"&ROW(x)&":"&ROW(x)); "E"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(indirect("DY"&ROW(x)&":"&ROW(x)); "A"; $DY$6:$6; $AL$6; $DY$5:$5; "H"))
    ; "-")
; "")))}

到目前为止,我使用了以下公式,但一旦我修改单元格,甚至当我只是复制/清除然后将相同的公式粘贴回同一单元格时,它就会停止工作(似乎不再支持或识别

index(DY:; ROW(x)) : index (DY:;ROW(x))
)作为公式的一部分)。

={
"𝒇x"; 
MAP($A9:$A; LAMBDA(x; IF(AND(x <> ""; index(AL:AL; ROW(x)) <> "");
    IFERROR(
        (COUNTIFS(index(DY:; ROW(x)) : index(DY:;ROW(x)); "P"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(index(DY:; ROW(x)) : index(DY:;ROW(x)); "D"; $DY$6:$6; $AL$6; $DY$5:$5; "H")) / 
        (COUNTIFS(index(DY:; ROW(x)) : index(DY:;ROW(x)); "P"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(index(DY:; ROW(x)) : index(DY:;ROW(x)); "D"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(index(DY:; ROW(x)) : index(DY:;ROW(x)); "I"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(index(DY:; ROW(x)) : index(DY:;ROW(x)); "E"; $DY$6:$6; $AL$6; $DY$5:$5; "H") + 
         COUNTIFS(index(DY:; ROW(x)) : index(DY:;ROW(x)); "A"; $DY$6:$6; $AL$6; $DY$5:$5; "H"))
    ; "-")
; "")))}

我需要替换间接,因为我的电子表格有很多间接的,它会减慢工作表的速度(甚至阻止工作表的某些部分工作)。有没有办法替代间接或者只是让系统重新识别代码?

google-sheets google-sheets-formula
1个回答
0
投票

您可以尝试用这个代替

indirect

offset(index(DY:DY;row(x));;;;columns(1:1))
© www.soinside.com 2019 - 2024. All rights reserved.