Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 如何仅对同一行特定列求和为true_Excel_Excel Formula - Fatal编程技术网

Excel 如何仅对同一行特定列求和为true

Excel 如何仅对同一行特定列求和为true,excel,excel-formula,Excel,Excel Formula,B6如何仅对同一行特定列A求和为真 e、 A2,A4是真的,所以B2+B4 | A | B 1 | Boolean | number | 2 | TRUE | 0 3 | FALSE | 1 4 | TRUE | 1 5 | FALSE | 1 - - - - - - - - - 6

B6如何仅对同一行特定列A求和为真 e、 A2,A4是真的,所以B2+B4

  | A                      | B
1 | Boolean                | number |
2 | TRUE                   | 0
3 | FALSE                  | 1
4 | TRUE                   | 1
5 | FALSE                  | 1
- - - - - - - - -
6 | 2 COUNTIF(A2:A5,TRUE)  | ?
你很接近:=SUMIFA2:A5,对,B2:B5

=SUMIF(B2:B5,A2:A5=TRUE)