![](/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.