Excel:在日期范围内计算不同(不是唯一)值的公式(在两个日期之间)

发布于 2025-01-29 22:00:31 字数 496 浏览 3 评论 0原文

为简单起见,我有两个列,一列包含ID/名称,另一个包含日期。

我想计算两个日期之间不同ID/名称的数量。示例:

IDs_Names   Date
1234        01/01/2021
234a        01/01/2021
1234        15/01/2021
1234        01/02/2021
234a        15/01/2021
1478        31/03/2021
5987        01/01/2021
(blank)     01/01/2021

假设我想知道01/01/2021和31/01/2021之内的不同值,我希望结果为3(1234,234a,5987),则应忽略空白。

现在,ID_NAMES列有望是数字的,但是,如果我们可以保持这种类型的灵活性,那将是很棒的(因为输入数据仍可以作为文本格式化为文本)。

我在网络中发现一个公式可以计算不同的值但没有其他条件,即日期范围。

谢谢你!

For simplicity I have two columns, one containing IDs/Names and the other one containing dates.

I would like to count the number of distinct IDs/Names between two dates. Example:

IDs_Names   Date
1234        01/01/2021
234a        01/01/2021
1234        15/01/2021
1234        01/02/2021
234a        15/01/2021
1478        31/03/2021
5987        01/01/2021
(blank)     01/01/2021

Assuming I want to know the distinct values within 01/01/2021 and 31/01/2021, I would expect results to be 3 (1234, 234a, 5987), blanks should be ignored.

Now ID_Names column is expected to be numeric, however, it would be great if we could keep this type flexible (as the input data may be formatted as text despite being a number).

I found in the web a formula that can count distinct values but not with additional conditions, i.e. a date range.

Thank you!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文