[英]Google Sheets Subtract Consecutive Columns Arrayformula ISBLANK
I'm trying to subtract consecutive columns of dates with arrayformula我正在尝试用 arrayformula 减去连续的日期列
07May2020 08Jun2020 09Jul2020 10Aug2020 11Sep2020
10Oct2020 11Nov2020 21Dec2020
10May2020 15Jul2020 18Aug2020 21Sep2020
I used this formula我用了这个公式
=arrayformula(if(isblank(F2:G),"",G2:G-F2:F))
This resulted in two columns of same result on every output.这导致在每个 output 上都有两列相同的结果。 How to combine all columns with arrayformula?
如何将所有列与arrayformula结合起来?
You can extend the arrayformula
to check if the column with the later date is empty, then apply the subtraction to the arrays:您可以扩展
arrayformula
以检查日期较晚的列是否为空,然后将减法应用于 arrays:
=arrayformula(if(isblank(B1:F),"",B1:F-A1:E))
In your sample spreadsheet:在您的示例电子表格中:
Reference: ARRAYFORMULA参考: ARRAYFORMULA
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.