在ARRAYFORMULA()中使用MIN() [英] Using MIN() inside ARRAYFORMULA()
问题描述
我在Google电子表格中看到了一些在 ARRAYFORMULA()
中使用 SUM()
的例子奇怪的是,他们都看起来像解决方法),但我不知道如何将它们应用于使用 MIN()
。
假设我有列 A
, B
和 C
,我只想在 D
列中得到 MIN(A:C)
的结果,只是为了匹配每一行的三个单元格。直接的方式应该是 ARRAYFORMULA(MIN(A1:C))
,但肯定不行。
如何以编程方式计算行中某些单元格的 MIN()
,用于Google Spreadsheet中的所有行?
ARRAYFORMULA ()
不会改变输出 - 它只会帮助转换不处理范围的公式。 作为一个快速回答,您可以简单地用 IF()
:
来重写
MIN()
的逻辑。 (A:A
I've seen some examples of using SUM()
inside an ARRAYFORMULA()
in Google Spreadsheets (and oddly enough, they all seem like workarounds) but I can't figure out how to apply them to using MIN()
instead.
Let's say I have columns A
, B
and C
and I just want to get the result of MIN(A:C)
on the D
column, just for the three cells that would match each row. The straightforward way should be ARRAYFORMULA(MIN(A1:C))
but surely enough that doesn't work.
How can I programmatically calculate the MIN()
of some cells within a row, for all the rows in a Google Spreadsheet?
MIN()
always returns a single value, regardless of the range size, so ARRAYFORMULA()
does not change the output - it only helps convert formulas that do not handle a range.
As a quick answer, you could simply rewrite the logic of MIN()
using something like IF()
:
=ARRAYFORMULA(if(A:A < B:B, if (A:A < C:C, A:A, C:C), if(B:B < C:C, B:B, C:C)))
这篇关于在ARRAYFORMULA()中使用MIN()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!