首页 > 解决方案 > 在 Google 表格中查询具有最新时间戳的行

问题描述

我在 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)")

标签: google-sheetsduplicatesuniquegoogle-sheets-formulagoogle-sheets-query

解决方案


尝试:

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

0


推荐阅读