Google表格SUMIF未求和范围 [英] Google Sheet SUMIF not summing range

查看:212
本文介绍了Google表格SUMIF未求和范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图根据某一行的值大于0的条件求和所有行.但是,该公式仅计算第一行,而忽略了其余范围.我在其他电子表格上遇到了此问题,但在新的电子表格上发现了该问题,以向您展示并提出问题.

I am trying to SUM all rows based on the condition that a row's value is greater than 0. However, the formula is only calculating the first row and ignoring the rest of the range. I encountered this issue on a different spreadsheet but I isolated the issue on a new spreadsheet to show you and ask questions.

答案应为B1($ 5),B2($ 15),B3($ 30). 我按照Google文档 https://support.google .com/docs/answer/3093583?hl = zh_CN

The answers should be B1 ($5), B2 ($15), B3 ($30). I followed the formula's usage as explained in the Google Docs https://support.google.com/docs/answer/3093583?hl=en

具有相应行号=SUMIF(A1, ">0", A$1:A1)


更新-以下是我的预期目的.我有一个电子表格,可以计算进出资金.对于这些交易中的每笔交易,我只希望这些交易产生余额.这仅适用于第一行. (我为其余行的值进行了硬编码,只是为了展示我的目标.)


Update - The below is my intended purpose. I have a spreadsheet that calculates money In and Out. For each of these transactions, I simply want the balance as a result of such transactions. This only works for the first row. (I hardcoded the values for the rest of the rows just to show my goal.)

推荐答案

尝试:

=ARRAYFORMULA(IF(A:A="",,SUMIF(ROW(A:A), "<="&ROW(A:A), A:A)))

如果您愿意拖动,请执行以下操作:

if you prefer dragging do:

=SUMIF(INDIRECT("A1:A"&ROW()), ">0")

=ARRAYFORMULA(IF(D2:D="",,
 SUMIF(ROW(D2:D), "<="&ROW(D2:D), D2:D)-
 SUMIF(ROW(E2:E), "<="&ROW(E2:E), E2:E)))

这篇关于Google表格SUMIF未求和范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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