符合

时间:2017-09-25 11:41:35

标签: excel excel-formula

如何使用sumproduct生产多个和sumif?我希望电池B17' = B2 * E2 + B7 * E7 + B12 * E12。

非常感谢

enter image description here

2 个答案:

答案 0 :(得分:1)

使用

    let users = [{"id": 1,"client": "Marcel","starttime": "15:00:00","endtime": "21:00:00","date": "22-09-2017","weeknumber": 38,"zipcode": "3831BC","housenumber": 2,"hncharacter": "","place": "Leusden","Salary": 135.13},
        {"id": 2,"client": "Peter","starttime": "13:00:00","endtime": "19:30:00","date": "23-09-2017","weeknumber": 38,"zipcode": "3831BC","housenumber": 2,"hncharacter": "","place": "Leusden","Salary": 194.87},
        {"id": 3,"client": "Marcel","starttime": "01:45:00","endtime": "09:00:00","date": "24-09-2017","weeknumber": 38,"zipcode": "3831BC","housenumber": 2,"hncharacter": "","place": "Leusden","Salary": 252.01}]
    function demo() {
        let result = [];
        for (let index = 0; index < users.length; index++) {
            let details = [];
            for (let key of Object.keys(users[index])) {
                details.push(users[index][key])
            }
            result.push(details);
        }
        console.log(result);
    }
    demo();

根据需要拖动/复制公式,如果需要,还可以向右拖动以计算=SUMPRODUCT(($A$2:$A$15=$A17)*(B$2:B$15)*(E$2:E$15)) 。见图片以供参考。

enter image description here

答案 1 :(得分:0)

=SUMPRODUCT((array1)*(ceriteria1)*(ceriteria2)*(ceriteria3)*(ceriteria n),(array2))