A google spreadsheet example of what I am trying to achieve can be found here: https://docs.google.com/spreadsheets/d/16x_2NFSyYreBsC0hFA3UuhCGmhZc8fvqtNpVwZn9SRw/edit?usp=sharing
我可以在此处找到我想要实现的Google电子表格示例:https://docs.google.com/spreadsheets/d/16x_2NFSyYreBsC0hFA3UuhCGmhZc8fvqtNpVwZn9SRw/edit?usp=sharing
In the above example, I am trying to find out the total number of days from ALL "Normal Ranges" that fall within the "Master Range" start/end.
在上面的例子中,我试图找出所有“正常范围”落在“主范围”开始/结束范围内的总天数。
Note: Please leave "Excel" tag as this is an excel question. I just made the google spreadsheet so that I could share easily with others.
注意:请留下“Excel”标签,因为这是一个很好的问题。我刚刚制作了谷歌电子表格,以便我可以轻松与他人分享。
1 个解决方案
#1
0
The following formula will give you the number of days for each Normal Range, if it falls within the Master Range:
以下公式将为您提供每个正常范围的天数,如果它在主范围内:
=IF(AND(A2>=$D$2, B2<=$E$2), B2-A2, 0)
Then, you can add up the days, using the SUM function.
然后,您可以使用SUM函数添加日期。
#1
0
The following formula will give you the number of days for each Normal Range, if it falls within the Master Range:
以下公式将为您提供每个正常范围的天数,如果它在主范围内:
=IF(AND(A2>=$D$2, B2<=$E$2), B2-A2, 0)
Then, you can add up the days, using the SUM function.
然后,您可以使用SUM函数添加日期。