简体   繁体   English

使用3个条件的加法(日期/特定文本)

[英]Sumifs using 3 conditions (dates/specific text)

Please excuse the basic (I imagine) question. 请原谅我的基本问题。

I have attempted to use Sumifs to Total up my expenses based on two categories. 我尝试使用Sumifs来基于两个类别总计费用。 These two categories are dates and type of expense. 这两个类别是日期和费用类型。

If an expense occurs in a certain week it will be totalled under whichever category it comes under. 如果某个星期发生了支出,则将其归入所属的任何类别。

The formula worked for the dates 1/04/2018 to 8/04/18, however, as soon as I tried to update the dates to the week after the formula did not work as I intended. 该公式适用于从1/04/2018到8/04/18的日期,但是,当我尝试将日期更新为公式无法正常使用后的一周。

Please find sample code below along with some screenshot of my file. 请在下面找到示例代码以及我的文件的一些屏幕截图。

=SUMIFS(  
    'Expenses - 2nd Quarter'!$D$3:$D$300,  
    'Expenses - 2nd Quarter'!$B$3:$B$300, ">="&'Weekly Budget'!$D$1,  
    'Expenses - 2nd Quarter'!$B$3:$B$300, "<"&$E$1,  
    'Expenses - 2nd Quarter'!$A$3:$A$300, 'Weekly Budget'!$A7)  
-  
 SUMIFS(    
    'Expenses - 2nd Quarter'!$C$3:$C$300,    
    'Expenses - 2nd Quarter'!$B$3:$B$300, ">="&'Weekly Budget'!$D$1,  
    'Expenses - 2nd Quarter'!$B$3:$B$300, "<"&$E$1,  
    'Expenses - 2nd Quarter'!$A$3:$A$300, 'Weekly Budget'!$A7)  

Weekly Expenses Tab 每周费用标签
img


Expenses - 2nd Quarter Tab 费用-第二季度标签
img

I couldn't find anything wrong with your formula. 我找不到您的公式有什么问题。 The only reason for not working is to enter wrong dates or dates in wrong order. 不起作用的唯一原因是输入错误的日期或日期顺序错误。 Otherwise, you should get what you want. 否则,您应该得到想要的东西。 And of course pivot table is always a good tool to do what you indent to do. 当然, pivot table始终是完成缩进操作的好工具。

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

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