gpt4 book ai didi

google-sheets - 阻止谷歌数组公式将工作表扩展到 50,000 行

转载 作者:行者123 更新时间:2023-12-04 02:58:45 25 4
gpt4 key购买 nike

我有一个数组公式,我设法将它组合在一起:

=ARRAYFORMULA(if(row(B:B)=1,"Status",(if(D:D="","",IF(D:D<today(),CONCAT("Overdue by ",(TODAY()-D:D) & " days"),IF(D:D<TODAY()+30,CONCAT("Due in ",(TODAY()-D:D) & " days"),if(D:D>today(),"Not Due","")))))))

出于某种原因,它使用空白单元格将工作表扩展得比我需要的要大得多。我只需要最多 500 个。有什么想法可以阻止这种情况发生吗?

最佳答案

在极端情况下,您可能会将公式包装在 ARRAY_CONSTRAIN 中并预定义最大行数和列数:

=array_constrain(ARRAYFORMULA(if(row(B:B)=1,"Status",(if(D:D="","",IF(D:D<today(),CONCAT("Overdue by ",(TODAY()-D:D) & " days"),IF(D:D<TODAY()+30,CONCAT("Due in ",(TODAY()-D:D) & " days"),if(D:D>today(),"Not Due",""))))))),500,1)

关于google-sheets - 阻止谷歌数组公式将工作表扩展到 50,000 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51307076/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com