简体   繁体   English

Excel SUMIFS在多个条件下卡住

[英]Excel SUMIFS on multiple conditions stuck

I need some help with my SUMIFS in excel. 我在Excel中的SUMIFS需要一些帮助。

Basically I want to sum values on given conditions. 基本上,我想对给定条件下的值求和。 This is the workbook: Workbook available 这是工作簿: 可用的工作簿

The data in the workbook is very simple but the structure is the same. 工作簿中的数据非常简单,但结构相同。

Question : 问题

How can I code a SUMIFS in excel if I need to sum on the conditions of Month and service? 如果我需要根据月份和服务的条件求和,该如何在excel中编写SUMIFS? Example sum actual customers for service p A in month 201501? 示例在201501月份将服务p A的实际客户总数相加?

I tried something like this: =SUMIFS(A3:I5="Service";B1:I1="Month";B2:I2="Actual Customers") 我尝试过这样的事情:= SUMIFS(A3:I5 =“ Service”; B1:I1 =“ Month”; B2:I2 =“实际客户”)

Please observe ";" 请遵守“;” is my local usage in excel It did not work. 是我在excel中的本地用法没用。

You are using the wrong syntax for SUMIFS . 您对SUMIFS使用的语法错误

Instead of using a conditional like A3:I5="Service , Excel expects you to first list the range you want to apply the criteria to, and then what the criteria is. In addition you haven't listed the range you want to sum if all your criteria is fulfilled, this comes first in SUMIFS -formula, as you can see if you use the function helper (click fx next to the formula line): Excel希望您不首先使用要像A3:I5="Service这样的条件,而是先列出要应用该条件的范围,然后再列出该条件是什么。此外,您还没有列出要求和的范围您的所有条件都得到满足,这首先出现在SUMIFS -formula中,如您所见,您是否使用了函数助手(单击公式行旁边的fx ):

在此处输入图片说明

Finally, it seems that not all your ranges are the same size, which I suspect will also create problems, I am not sure about this though. 最后,似乎您的范围并非全部相同,我怀疑这也会造成问题,不过我不确定。 Checking against the documentation on the MSDN page for SUMIFS , Microsoft claims that the ranges do not need to be the same size: Microsoft查阅MSDN页面上的SUMIFS文档,Microsoft声称范围不必相同:

Each criteria_range does not have to be the same size and shape as sum_range. 每个criteria_range的大小和形状不必与sum_range相同。 The actual cells that are added are determined by using the top, left cell in that criteria_range as the beginning cell, and then including cells that correspond in size and shape to sum_range. 通过使用该criteria_range中的顶部,左侧单元格作为开始单元格,然后包括大小和形状与sum_range对应的单元格,确定要添加的实际单元格。

However, as was pointed out in the comments, their support page for SUMIFS claims the opposite, and this is further confirmed by testing in Excel. 但是,正如评论中指出的那样,他们对SUMIFS的支持页面与此相反,而这在Excel中进行了测试得到了进一步证实。 In short, you should probably stick with having the criteria_ranges being the same size as the sum_range. 简而言之,您可能应该坚持让criteria_ranges与sum_range的大小相同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM