如何自动总和到没有找到数字?
我想制作一个单元格自动计算上述所有数字,直到没有数字为止(在我的示例中,直到符合合并的单元格“文本行”)。
为了更好地理解,有屏幕截图: https://prnt.sc/7p8fppagzt3ep
到目前为止计算直到给定电池E2: = sum(e2:index(e:e; row() - 1))
问题是我必须在公式中编写E2。有什么办法可以在E2上制作公式自动停止?
I want to make a cell auto calculate all numbers above until there is no number (in my example until it meets merged cell "TEXT ROW").
For better understanding there is screenshot: https://prnt.sc/7p8fPagzt3Ep
So far I've made cell E8 to count up until given cell E2: =SUM(E2:INDEX(E:E;ROW()-1))
The problem is that I have to write E2 in formula. Is there any way to make formula auto stop at E2?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此公式应为您工作:
= sum(间接(“ e”& row() - counta(a2:a)&“:e”& row() - 1))
by使用
row() - counta(a2:a)
,我正在采用公式所在的行,并减去从A2开始的数据条目的数量(即忽略AT的合并单元格顶部)。这将使您成为首发行,2。 /eenl.png“ alt =” ex“>
如果您对此有任何问题,请告诉我。
This formula should work for you:
=SUM(indirect("E"&row()-counta(A2:A)&":E"&ROW()-1))
By using
row()-counta(A2:A)
, I am taking the row that the formula is in, and subtracting the number of data entries starting at A2 (ie ignoring the merged cell at the top). This will get you the starting row, 2.Please let me know if you have any issues with this.
尝试:
或:
try:
or: