天天看點

Excel裡實作 sum(case when xxx then xxx else xxx end)的用法

需求描述

要實作SQL裡的 ​

​sum(case when A列>200 and A列<=400 then B列 else 0 end)的功能​

​:

Excel裡實作 sum(case when xxx then xxx else xxx end)的用法

這裡主要用到了​

​sumifs​

​函數:

=SUMIFS($B$2:$B$108250,$A$2:$A$108250,">200",$A$2:$A$108250,"<=400")