在ARRAYFORMULA()中使用MIN() [英] Using MIN() inside ARRAYFORMULA()

查看:137
本文介绍了在ARRAYFORMULA()中使用MIN()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google电子表格中看到了一些在 ARRAYFORMULA()中使用 SUM()的例子奇怪的是,他们都看起来像解决方法),但我不知道如何将它们应用于使用 MIN()



假设我有列 A B C ,我只想在 D 列中得到 MIN(A:C)的结果,只是为了匹配每一行的三个单元格。直接的方式应该是 ARRAYFORMULA(MIN(A1:C)),但肯定不行。



如何以编程方式计算行中某些单元格的 MIN(),用于Google Spreadsheet中的所有行?

MIN()总是返回一个值,无论范围大小如何,所以 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆