在Excel 2007中,如何从命名范围的多个列的SUMIFS索引? [英] In Excel 2007, how can I SUMIFS indices of multiple columns from a named range?

查看:172
本文介绍了在Excel 2007中,如何从命名范围的多个列的SUMIFS索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在分析与特定用户类别的贷款有关的图书馆统计数据。贷款数据形成了指定范围LoansToApril2013。 Excel 2007非常高兴能够使用索引范围作为SUMIF中的总和范围:

  = SUMIF(INDEX(LoansToApril2013 ,0,3),10,INDEX(LoansToApril2013,0,4):INDEX(LoansToApril2013,0,6))

这里10表示一个特定的用户类别,这是从三列中对该组提供的贷款的总和。 index range我指的是

  INDEX(LoansToApril2013,0,4):INDEX(LoansToApril2013,0, 6)

sum_range value。



,如果我切换到使用SUMIFS来添加更多的标准,如果使用索引范围,Excel将返回#VALUE错误。它只会接受一个索引。

  = SUMIFS(INDEX(LoansToApril2013,0,4),INDEX(LoansToApril2013,0,3),1,INDEX(LoansToApril2013 ,0,1),PTFBL)

工作正常

  = SUMIFS(INDEX(LoansToApril2013,0,4)):INDEX(LoansToApril2013,0,6),INDEX(LoansToApril2013,0,3),1,INDEX(LoansToApril2013 ,0,1),PTFBL)

返回#value,我不知道为什么有趣的是,

  = SUMIFS(INDEX(LoansToApril2013,0 ,4):INDEX(LoansToApril2013,0,4),INDEX(LoansToApril2013,0,3),1,INDEX(LoansToApril2013,0,1),PTFBL)
pre>

也被接受,并返回与第一个具有单个索引的相同。



没有找到与此有关的任何文件或评论。有没有人知道是否有一个可以让SUMIFS从三列中有条件地总和索引值的替代结构?我宁愿不使用三个单独的公式,并将它们添加在一起,尽管可能。

解决方案

如果要使用名称范围您需要使用INDIRECT进行索引命令。



我使用该公式来检查两列中的条件,然后在一个表中SUM结果,其中有12列几个月(这个列是由1到12 [L4]的辅助单元格选择)。



所以你可以这样做:



部门(1列名称范围[C6])=销售[D6];
区域(1列名称范围[C3])=美国[D3];
SUM数字在12列每月的名称范围表[E7]为1个单月[L4]为这些人/产品/行项目



只需在您的报告页面中复制公式,该页面有几个月的列1-12,您可以获得每月有2个条件的摘要报告。



= SUMPRODUCT ((INDEXECT($ C $ 6),0,1)= $ D $ 6)*(INDEX(INDIRECT($ C $ 3),0,1)= $ D $ 3)* INDEX(INDIRECT($ E7),0 ,L $ 4))


I am analysing library statistics relating to loans made by particular user categories. The loan data forms the named range LoansToApril2013. Excel 2007 is quite happy for me to use an index range as the sum range in a SUMIF:

=SUMIF(INDEX(LoansToApril2013,0,3),10,INDEX(LoansToApril2013,0,4):INDEX(LoansToApril2013,0,6))

Here 10 indicates a specific user category, and this sums loans made to that group from three columns. By "index range" I'm referring to the

INDEX(LoansToApril2013,0,4):INDEX(LoansToApril2013,0,6)  

sum_range value.

However, if I switch to using a SUMIFS to add further criteria, Excel returns a #VALUE error if an index range is used. It will only accept a single index.

=SUMIFS(INDEX(LoansToApril2013,0,4),INDEX(LoansToApril2013,0,3),1,INDEX(LoansToApril2013,0,1),"PTFBL") 

works fine

=SUMIFS(INDEX(LoansToApril2013,0,4):INDEX(LoansToApril2013,0,6),INDEX(LoansToApril2013,0,3),1,INDEX(LoansToApril2013,0,1),"PTFBL")

returns #value, and I'm not sure why.

Interestingly,

=SUMIFS(INDEX(LoansToApril2013,0,4):INDEX(LoansToApril2013,0,4),INDEX(LoansToApril2013,0,3),1,INDEX(LoansToApril2013,0,1),"PTFBL")

is also accepted and returns the same as the first one with a single index.

I haven't been able to find any documentation or comments relating to this. Does anyone know if there is an alternative structure that would allow SUMIFS to conditionally sum index values from three columns? I'd rather not use three separate formulae and add them together, though it's possible.

解决方案

If you want to use names ranges you need to use INDIRECT for the Index commands.

I used that formula to check for conditions in two columns, and then SUM the results in a table which has 12 columns for the months (the column is chosen by a helper cell which is 1 to 12 [L4]).

So you can do if:

Dept (1 column name range [C6]) = Sales [D6]; Region (1 column name range [C3]) = USA [D3]; SUM figures in the 12 column monthly named range table [E7] for that 1 single month [L4] for those people/products/line item

Just copy the formula across your report page which has columns 1-12 for the months and you get a monthly summary report with 2 conditions.

=SUMPRODUCT( (INDEX(INDIRECT($C$6),0,1)=$D$6) * (INDEX(INDIRECT($C$3),0,1)=$D$3) * INDEX(INDIRECT($E7),0,L$4))

这篇关于在Excel 2007中,如何从命名范围的多个列的SUMIFS索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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