【问题标题】:Query rows with most recent time stamp in Google Sheets在 Google 表格中查询具有最新时间戳的行
【发布时间】:2020-03-18 19:05:34
【问题描述】:

我在 Google 表格中有一些数据,其中包含不同日期的重复帐号。我想查询数据并删除重复项,并仅选择日期最近的那些行。

样本数据在这里:

115684  11/21/2019  Blue
115684  11/20/2019  Green
115684  11/19/2019  Yellow
165488  11/17/2019  Red
165488  11/12/2019  Blue
165488  6/19/2019   Green
556689  11/21/2019  Yellow
556690  11/21/2019  Red
556691  6/19/2019   Blue

所以结果应该是这样的:

115684  11/21/2019  Blue
165488  11/17/2019  Red
556689  11/21/2019  Yellow
556690  11/21/2019  Red
556691  6/19/2019   Blue

我试过了,但没用:

=QUERY(A:C, "SELECT A, B, C WHERE MAX(B)")

【问题讨论】:

  • 我最终使用了这个:
  • =SORTN(SORT(A:C,2,0), 999999999, 2, 1, 0) 与建议的 player0 相同,只是对列选择稍作修改

标签: google-sheets duplicates unique google-sheets-formula google-sheets-query


【解决方案1】:

尝试:

=SORTN(SORT(A1:C, 2, 0), 99^99, 2, 2, 0)

【讨论】:

  • 您好,感谢您的及时回复。我没有考虑 sortn 功能。效果很好。
猜你喜欢
  • 2016-02-15
  • 1970-01-01
  • 2014-03-08
  • 2018-10-22
  • 1970-01-01
  • 2020-11-02
  • 2020-04-11
  • 1970-01-01
相关资源
最近更新 更多