简体   繁体   English

多个条件的sumifs语法不正确

[英]sumifs syntax for multiple conditions incorrect

I'm currently working from two worksheets, a main data sheet titled 'Equities' which details the stock trading data undertaken on a daily basis. 我目前正在使用两个工作表,一个名为“ Equities”的主要数据表,其中详细列出了每天进行的股票交易数据。 I've attached a screenshot of the column labels below for this worksheet. 我已经为该工作表附上了下面列标签的屏幕快照。

在此处输入图片说明

I have a monthly commission worksheet which draws information from the equities sheet using sumifs to return results to a relevant date range. 我有一个每月的佣金工作表,该表使用sumifs从股票表中获取信息,以将结果返回到相关的日期范围。 I've attached the column labels screenshot below and the date column to show how it is categorised. 我已在下面附加了列标签屏幕截图和日期列,以显示其分类方式。

在此处输入图片说明

在此处输入图片说明

=SUMIFS(Equities!L:L,Equities!A:A,">=1/10/2018",Equities!A:A,"<=31/10/2018")

The above sumif returns an accurate result for the gross revenue USD column on the monthly commission worksheet. 上面的sumif返回每月佣金工作表上“总收入美元”列的准确结果。 I have tried to adjust the sumif by adding an additional criteria so as to have monthly figures for Trader 1, 2, 3 etc. 我试图通过添加其他条件来调整总和,以便获得交易员1、2、3等的月度数字。

=SUMIFS(Equities!$N:$N, Equities!$L:$L, Monthly Commission!$C1, Equities!$A:$A,">=1/10/2018",Equities!$A:$A,"<=31/10/2018"

The SUMIF above is the one I've edited to include the trader as an additional criteria. 上面的SUMIF是我编辑的,以将交易者作为附加条件。 However, it has not worked and returns a 0 value, and also prompts me to open a file. 但是,它没有用,返回0值,并提示我打开文件。 I'm not sure where the error is in the syntax or composition of the sumif, so any advice on how to correct it would be greatly appreciated. 我不确定sumif的语法或组成在哪里,因此,任何有关如何纠正它的建议将不胜感激。

由于每月佣金表的名称中有一个空格,因此需要将其用单引号引起来:

=SUMIFS(Equities!$N:$N, Equities!$L:$L, 'Monthly Commission'!$C1, Equities!$A:$A,">=1/10/2018",Equities!$A:$A,"<=31/10/2018")

正在汇总不正确的列,答案由@XORLX提供。

=SUMIFS(Equities!$L:$L, Equities!$N:$N, 'Monthly Commission'!$C1, Equities!$A:$A,">=1/10/2018",Equities!$A:$A,"<=31/10/2018")

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

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