答案1
=IF(F387="Test1",SUMIFS(B390:B399,A390:A399,">="&C402,A390:A399,"<="&D402),IF(F387="Test2",SUMIFS(C390:C399,A390:A399,">="&C402,A390:A399,"<="&D402),IF(F387="Test3",SUMIFS(D390:D399,A390:A399,">="&C402,A390:A399,"<="&D402),IF(F387="Test4",SUMIFS(E390:E399,A390:A399,">="&C402,A390:A399,"<="&D402),0))))
注意: 1.请根据您的需要调整数据范围,因为我曾在不同的数据范围内工作过。
- 此解决方案也适用于 Excel 和 Google Sheet。