Google Spreadsheet中的SUMIFS功能 [英] SUMIFS function in Google Spreadsheet

查看:206
本文介绍了Google Spreadsheet中的SUMIFS功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用类似于 SUMIFS 的功能(如 SUMIF ,但多于单个标准)在Google Spreadsheet中。 MS-Excel内置此功能( http://office.microsoft.com/en-us/excel-help/sumifs-function-HA010342933.aspx?CTT=1 )。



我尝试使用ArrayFormula( http:// support.google.com/docs/bin/answer.py?hl=zh-CN&answer=71291 ),类似于SUMIF:

  = ARRAYFORMULA(SUM(IF(A1:A10> 5,A1:A10,0)))

通过添加 AND

  = ARRAYFORMULA (SUM(IF(AND(A1:A10> 5,B1:B10 = 1),C1:C10,0)))

AND 函数没有选取 ArrayFormula 指令并返回FALSE所有的时间。



我唯一能找到的解决方案是使用 QUERY whi ch看起来有点慢和复杂:

  = SUM(QUERY(A1:C10,Select C where A> 5 AND B = 1))

我的目标是填满一张表(类似于数据透视表),许多要计算的值:

$ $ $ $ $ $ $ $ $ $ $ $ $ $ = SUM(QUERY(DataRange,Concatenate(Select C where A =,$ A2, AND B =,B $ 1)))

有没有人设法以更简单,我发现一个更快的函数来填充数据透视表:
$

解决方案

b $ b

  = ARRAYFORMULA(SUM((Sample!$ A:$ A)= $ A2)*((Sample!$ B:$ B)= B $ 1)* (Sample!$ C:$ C)))

如果没有更重的 String Query 函数。


I'm trying to have a similar function to SUMIFS (like SUMIF but with more than a single criterion) in a Google Spreadsheet. MS-Excel has this function built-in (http://office.microsoft.com/en-us/excel-help/sumifs-function-HA010342933.aspx?CTT=1).

I've tried to use ArrayFormula (http://support.google.com/docs/bin/answer.py?hl=en&answer=71291), similar to the SUMIF:

=ARRAYFORMULA(SUM(IF(A1:A10>5, A1:A10, 0)))

By Adding AND:

=ARRAYFORMULA(SUM(IF(AND(A1:A10>5,B1:B10=1), C1:C10, 0)))

But the AND function didn't pick up the ArrayFormula instruction and returned FALSE all the times.

The only solution I could find was to use QUERY which seems a bit slow and complex:

=SUM(QUERY(A1:C10,"Select C where A>5 AND B=1"))

My Target is to fill up a table (similar to a Pivot Table) with many values to calculate:

=SUM(QUERY(DataRange,Concatenate( "Select C where A=",$A2," AND B=",B$1)))

Did anyone manage to do it in a simpler and faster way?

解决方案

I found a faster function to fill up the "pivot table":

=ARRAYFORMULA(SUM(((Sample!$A:$A)=$A2) * ((Sample!$B:$B)=B$1) * (Sample!$C:$C) ))

It seems to run much faster without the heavier String and Query functions.

这篇关于Google Spreadsheet中的SUMIFS功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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