Google表格 - 查询或过滤数据,按ID和最新日期查询

发布于 2025-01-24 11:16:55 字数 745 浏览 1 评论 0原文

我在过滤一组包含注释历史记录的数据时遇到了麻烦。相同的ID可能会留下几个笔记,但我只想为每个唯一ID剩下的最新注释。

在这里有几列 - 我想拉动A,B,C,E,F,G,H,L,M,N,O,p。 ID在A列中,日期在M中。

我还想排除带有空白(L)的所有行。

我有一个公式在下面的公式,基于研究如何拉出我想要的东西,但是它是在提取最早的日期,而不是最近的日期,但我还没有弄清楚如何做相反的日期 - 并将最近的日期拉动为我需要做。我还尝试使用A查询A Max(M)组的查询,但是我有一个错误。

=ARRAYFORMULA(IFERROR(VLOOKUP(UNIQUE('Data - All'!A2:A),SORT({'Data - All'!A2:C,'Data - All'!E2:H,'Data - All'!L2:L,'Data - All'!M2:M,'Data - All'!N2:P},4,0),{1,2,3,4,5,6,7,8,9,10,11,12,13,14},0)))

我的公式也不会拉动标头,也不排除在音符列为空白的地方。

任何帮助将不胜感激。

谢谢!

I'm having trouble filtering a set of data containing Note history. Several notes may be left for the same ID, but I want to pull only the most recent notes left, for each unique ID.

Here is a sample dataset. There are several columns - I want to pull columns A,B,C,E,F,G,H,L,M,N,O,P. The ID is in Column A and the date is in Column M.

I also want to exclude any rows with blank Notes (Column L).

I have a formula, below, based on research into how to pull what I want, but it's pulling the earliest dates rather than the most recent dates and I haven't figured out how to do the opposite - and pull the most recent dates as I need to do. I also tried to use a QUERY looking at Max(M) group by A, but I got an error.

=ARRAYFORMULA(IFERROR(VLOOKUP(UNIQUE('Data - All'!A2:A),SORT({'Data - All'!A2:C,'Data - All'!E2:H,'Data - All'!L2:L,'Data - All'!M2:M,'Data - All'!N2:P},4,0),{1,2,3,4,5,6,7,8,9,10,11,12,13,14},0)))

My formula also doesn't pull the header and doesn't exclude rows where the Note column is blank.

Any help is greatly appreciated.

Thanks!

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

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

发布评论

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

评论(2

故笙诉离歌 2025-01-31 11:16:55

尝试:

=ARRAYFORMULA({'Data - All'!A1:P1;
 SORTN(SORT('Data - All'!A2:P, 13, 0), 9^9, 2, 1, 1)})

13  - column with dates
0   - descending (latest first)
9^9 - return all rows
2   - sortn grouping mode
1   - group by first column
1   - in ascending order

try:

=ARRAYFORMULA({'Data - All'!A1:P1;
 SORTN(SORT('Data - All'!A2:P, 13, 0), 9^9, 2, 1, 1)})

13  - column with dates
0   - descending (latest first)
9^9 - return all rows
2   - sortn grouping mode
1   - group by first column
1   - in ascending order

enter image description here

唱一曲作罢 2025-01-31 11:16:55

尝试:

=ARRAYFORMULA({'Data - All'!A1:P1; IFERROR(VLOOKUP(UNIQUE('Data - All'!A2:A), 
 SORT('Data - All'!A2:P, 13, 0), SEQUENCE(1, 16), 0))})

try:

=ARRAYFORMULA({'Data - All'!A1:P1; IFERROR(VLOOKUP(UNIQUE('Data - All'!A2:A), 
 SORT('Data - All'!A2:P, 13, 0), SEQUENCE(1, 16), 0))})

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文