均与和和或
如果满足某些嵌套和 /或条件,我想获得平均列的平均值:
=平均值(target_col,(col_a> = date1 and col_b< = date2)或(col_a> = date 3 and col_b&lt = date2)或col_a> =日期4)
有办法做到吗? 谢谢
I would like to get the average of a column if some nested AND / OR conditions are met:
=AVERAGEIFS (Target_Col,(Col_A >= Date1 AND Col_B <= Date2 ) OR (Col_A >= Date3 AND Col_B <= Date4)
Is there a way to do it?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
处理这种情况的最简单方法可能是在您的工作簿中创建一个包含和/或功能的“助手”列,然后创建该列的平均值。
示例:
新列包含公式
if(or(and(cola&gt; = date1,colb&lt; = date2)和(cola&gt; = date3,colb&lt; = date4)),targetcol,“”),
如果条件为满足,如果满足条件,则为空白。然后,只需平均使用“助手”列即可。
Probably the simplest way to handle this situation is to create a "helper" column in your workbook that contains the AND/OR functions, and then create an average of that column.
Example:
New column contains the formula
IF(OR(AND(ColA >= Date1, ColB <=Date2), AND(ColA >= Date3, ColB <= Date4)),TargetCol,"")
This will return the value to average if conditions are met, or a blank if no conditions are met. Then simply take an average of your "helper" column.