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

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

问题描述

我已经看到了一些在 Google 电子表格中的 ARRAYFORMULA() 中使用 SUM() 的例子(奇怪的是,它们似乎都是解决方法),但我可以不知道如何将它们应用于使用 MIN() 代替.

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.

假设我有 ABC 列,我只想得到 MIN(A:C)D 列上,仅用于匹配每一行的三个单元格.直接的方法应该是 ARRAYFORMULA(MIN(A1:C)) 但肯定是行不通的.

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.

如何以编程方式计算 Google 电子表格中所有行中某些单元格的 MIN()?

How can I programmatically calculate the MIN() of some cells within a row, for all the rows in a Google Spreadsheet?

推荐答案

MIN() 总是返回单个值,不管范围大小,所以 ARRAYFORMULA()不会改变输出 - 它只会帮助转换不处理范围的公式.

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.

作为一个快速的答案,您可以简单地使用类似 IF() 的东西重写 MIN() 的逻辑:=ARRAYFORMULA(if(A:A

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天全站免登陆