![](/img/trans.png)
[英]How to find lowest value along with the date for given set of data(date-value pair) in Google Sheet Formula?
[英]Google Sheet: How to find Highest Value along with the date for given set of data(date-value pair) in Google Sheet Formula?
我在 Google 表格中有以下日期值对格式的数据:
日期 | 价值 |
---|---|
2021 年 1 月 8 日 | 1301.85 |
2021 年 1 月 11 日 | 1303.9 |
2021 年 1 月 12 日 | 1320.05 |
2021 年 1 月 13 日 | 1291.55 |
2021 年 1 月 14 日 | 1287.45 |
2021 年 1 月 15 日 | 1270 |
我正在寻找一个谷歌表格公式,它将返回 output: 最大值及其相关日期。 这意味着我正在尝试获取 output 如下: 1/12/2021 1320.05
尝试这个:
=INDEX(SORT(A2:B), 2, 0), 1)
您也可以使用SORTN function。
不同之处在于,通过使用INDEX
公式,您需要将A
列结果重新格式化为日期,而使用SORTN
则不需要。
=SORTN(A2:B,1,0,2,0)
我们公式中的SORTN
function 如何工作
1
是“要返回的项目数” (因为我们只需要我们将其设置为 1 的最大值)0
“最多显示前 n 行” (这就是所谓的 ties_mode,在我们的例子中为 0)2
是“包含要排序的值的列的索引” ,这里是第二列0
“表示如何对sort_column进行排序。TRUE (或1)按升序排序。FALSE (或0)按降序排序”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.