作业帮 > 综合 > 作业

excel - sumif

来源:学生作业帮 编辑:拍题作业网作业帮 分类:综合作业 时间:2024/04/28 03:55:13
excel - sumif
what's wrong with this one?
=IF(BE1="Jan-Sep 100% Total",SUMIF(G1:AP1,"100% Budget",20:20),IF(BE1="Jan-Sep 130% Total",SUMIF(G1:AP1,"130% Budget",20:20),SUMIF(G1:AP1,"160% Budget",20:20)))
When I changed it into this.,it works perfectly
=IF(BE1="Jan-Sep 100% Total",SUMIF(G1:AP1,"100% Budget",G20:AP20),IF(BE1="Jan-Sep 130% Total",SUMIF(G1:AP1,"130% Budget",G20:AP20),SUMIF(G1:AP1,"160% Budget",G20:AP20)))
How does the range_2 generate the difference?
函数sumif的语法为 SUMIF(range,criteria,sum_range)
Range 为用于条件判断的单元格区域.
Criteria 为确定哪些单元格将被相加求和的条件,其形式可以为数字、表达式或文本.例如,条件可以表示为 32、"32"、">32" 或 "apples".
Sum_range 是需要求和的实际单元格.
而你第一个公式里面sumif函数的第三个参数为20:20不是个有效的求和单元格区域,所以语法上就不对.