如何基于工作表中另一个范围之下的另一个范围求和一个范围 [英] How to sum a range based on another range which comes under another range in sheets

查看:76
本文介绍了如何基于工作表中另一个范围之下的另一个范围求和一个范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何根据另一个范围内的另一个范围来对工作表中的范围求和.

I wanted to know how can we sum a range in a sheet based on another range which comes under another range.

示例:如果相应的单元格B1:B10值位于D2:D或E2:E列表下,则我希望A2:A10之和

Example: I want the sum of A2:A10 if corresponding cell B1:B10 value comes under a list which is D2:D or E2:E

在示例中,

Sum of Fruits:    ? 
Sum of Vegetable: ?

推荐答案

=DSUM({"x", "y"; A2:B}, "x", {"y"; FILTER(E2:E, E2:E<>"")})

=DSUM({"x", "y"; A2:B}, "x", {"y"; FILTER(D2:D, D2:D<>"")})

欧盟语法:

  • =DSUM({"x"; "y"\ A2:B}; "x"; {"y"\ FILTER(E2:E; E2:E<>"")})
  • =DSUM({"x"; "y"\ A2:B}; "x"; {"y"\ FILTER(D2:D; D2:D<>"")})

这篇关于如何基于工作表中另一个范围之下的另一个范围求和一个范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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