如何在Google表格中不同列中的每个唯一值获得最大值?

发布于 2025-01-27 21:04:37 字数 563 浏览 3 评论 0原文

我有两个列,第一列(a)具有名称,第二列(b)具有值。

AB
苹果10
12
14
苹果8

是否可以从A中获得具有唯一名称和最大值的行? 因此,结果应该看起来像这样:

AB
苹果10
橙色14

我尝试使用过滤器,查询和独特的不同组合,但到目前为止没有运气。请注意,我使用的实际数据集比这大得多,但是这个想法是相同的。

I have two columns, the first column (A) has names and the second column (B) has values.

AB
apple10
orange12
orange14
apple8

Is there a way to get only rows with unique names from A AND max values from B?
So the result should look like this:

AB
apple10
orange14

I tried using different combinations of FILTER, QUERY and UNIQUE, but so far no luck. Note that the actual dataset I'm using is much larger than this, but the idea is the same.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风启觞 2025-02-03 21:04:37

使用:

=SORTN(SORT(A:B; 2; 0); 9^9; 2; 1; 1)

use:

=SORTN(SORT(A:B; 2; 0); 9^9; 2; 1; 1)
去了角落 2025-02-03 21:04:37

也应该在查询中直接处理:

=query(A:B,"select A,max(B) where A is not null group by A")

Should be doable directly within a query as well:

=query(A:B,"select A,max(B) where A is not null group by A")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文