Excel:在日期范围内计算不同(不是唯一)值的公式(在两个日期之间)
为简单起见,我有两个列,一列包含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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论