SUMIF包含在阵列元件中的一个(OR) [英] SUMIF contains one of elements in array (OR)

查看:77
本文介绍了SUMIF包含在阵列元件中的一个(OR)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我付款清单,我想总结一下这说明等于在我的数组中的元素之一的成本。

I have a list of payments where I would like to sum up the costs which description equals to one of the elements in my array.

EMTE     € 120,00 
Bread    € 35,24 
Lidl     € 0,89 
Plus     € 5,19 
Aldi     € 2,29 
Jumbo    € 4,70 

因此​​,与数组 {利德尔,阿尔迪} ,它会给我的总的(2.29 + 0.89)3.18

So with an array of {"Lidl", "Aldi"}, It would give me the total of (2,29+0,89) 3,18.

我试过 Sum.If ,但我似乎并没有如何正确使用语句在它与数组类型的输入相结合。

I tried Sum.If, but I don't seem how to use the or statement in it properly and combine it with an array kind of input.

推荐答案

包住的 SUMIF /的 SUMIFS在<一个功能href=\"https://support.office.com/en-us/article/SUMPRODUCT-function-57a7bfa7-f74d-4ead-8c93-57f759c8f616\"相对=nofollow> SUMPRODUCT功能来提供循环计算的额外级别。

Wrap the SUMIF / SUMIFS function in a SUMPRODUCT function to provide an extra level of cyclic calculation.

=SUMPRODUCT(SUMIFS(B:B, A:A, {"Lidl","Aldi"}))

Aldi_Lidl

这篇关于SUMIF包含在阵列元件中的一个(OR)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆