如果语句为false,则零
这是Google表中的一些示例数据:
我想返回clice of the the the pack的总和,如果一列包含拾音器,并且在这种情况下(在这种情况下)列中的所有文本都是实际的)。
这是我尝试过的公式:在这种情况下(“拾取”总和为0,它将其返回为false,但我需要它为$ 0.00)
=IF(
SUMIFS(C1:C5,B1:B5,"Pick Up"),
SUMIFS(C1:C5,B1:B5,"Pick Up"),
SUMIFS(C1:C5,B1:B5,"Actuals")
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这张Google表:
您想让您的病情使您的病情成为Countifs :
实际上,实际上第二个选项中的sumifs并不是真正必要的。如果列中唯一的事情是实际的,那么您可以使用总和:
希望这会有所帮助。
原始答案如下。我在示例数据后对他们进行了编辑,并提供了有关问题的清晰度。它们是出于历史目的,或者有人在问题上查看编辑历史记录,或者是否不接受编辑。
编辑:根据评论中的反馈。如果您想在没有取货时返回实际的总和,请将SUMIFS条件更改为Countifs:
原始答案:
如果没有一些实际数据,这有点困难,但是我认为您的问题是,如果您的条件(Sumifs使用”拾取”)返回0,然后是一个虚假的值,因此将转到第二个输出。
试试看:这样:
如果Sumifs返回0(或更高),那么您将获得一个明确的真实值,可以在IF的第一部分中使用,而不是Excel将尝试将其解释为布尔值的数字。
Take a look at this Google Sheet:
https://docs.google.com/spreadsheets/d/13a4ZcgFu-yRiyZohXmh0aDnW0EheTOGElXvyQ0WHeHI/edit#gid=0
You want to make your condition a COUNTIFS, so that if Pick Up is found in the column it returns the first option and if not the second:
Actually, the SUMIFS in the second option for Actuals isn't really necessary. If the only thing in the column is Actuals, then you can just use SUM:
Hope this helps.
The original answers are below. I edited them after sample data and clarity on the question was provided. They are left for historical purposes, or if someone looks at the edit history on the question, or if the edit isn't accepted.
EDIT: based on feedback in the comment. If you want to return the sum of Actuals when there are no Pick Ups, change the sumifs condition to countifs:
Original answer:
It's a little hard without some actual data, but I think your issue is that if your condition (the sumifs using "Pick Up") returns 0 then that's a falsy value, so it goes to the second output.
Try this instead:
That way if the sumifs returns 0 (or greater) then you will get an explicitly TRUE value to use in the first part of the if, instead of a number that Excel is going to try to interpret as boolean.