Google 表格根据日期过滤

问题描述 投票:0回答:1

在 Google 表格中,当提供的日期介于 B 列和 C 列的值之间时,我尝试从 A 列查找值。例如,如果我在提供 5/8/2024 时查找值,我会得到 35。我做了一些谷歌搜索,我认为 FILTER 功能是可行的方法,但我无法让它工作。谁能帮我看看我做错了什么?

=FILTER('Pay Periods'!A:A,'Pay Periods'!B:B>=A192,'Pay Periods'!C:C<=A192)

enter image description here enter image description here

enter image description here

google-sheets google-sheets-formula
1个回答
2
投票

您的公式中的逻辑似乎有问题。我假设您遇到了

#N/A No matches found...
错误。

在下面的屏幕截图所示的行中并参考您的示例,

Screenshot 1

4/26/2024 不大于或等于 A192 (5/1/2024) 中的值。考虑改变

=FILTER('Pay Periods'!A:A,'Pay Periods'!B:B>=A192,'Pay Periods'!C:C<=A192)

至:

=FILTER('Pay Periods'!A:A,'Pay Periods'!B:B<=A192,'Pay Periods'!C:C>=A192)
© www.soinside.com 2019 - 2024. All rights reserved.