简体   繁体   English

我可以使用Excel公式来计算一些连续行的总和吗?

[英]Can I use an Excel formula to calculate the sum of some continuous rows?

I have an Excel sheet and it has some data rows looks like: 我有一个Excel工作表,它有一些数据行,如下所示:

A    B
---  ---
1    2
2    3
3    1

I don't know the rows of the data range until I open the sheet. 在打开工作表之前,我不知道数据范围的行。 I want to know, if it's possible to write a formula to calculate 我想知道,是否有可能写一个公式来计算

1X2 + 2X3 + 3X1 + ...(we may have more rows!)

and put the result in a new cell. 并将结果放入新的单元格中 For now I have to use the formula like 现在,我必须使用类似

A1*B1 + A2*B2 + A3*B3

If there are more rows in the data range, I have to add more items in my formula, which is not convenience. 如果数据范围中有更多行,则必须在公式中添加更多项,这不方便。

This is the intended use of the SUMPRODUCT function. 这是SUMPRODUCT函数的预期用途。 Try: 尝试:

=SUMPRODUCT(A:A,B:B)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel:我可以使用总体公式找到各个行的总和吗? - Excel: Can I find the sum of individual rows using an overarching formula? 使用 Excel 公式计算来自不同列的相同行的总和 - Calculate the Sum of same rows from different columns using Excel formula 在Excel中,我可以编写一个公式来根据另一列的内容计算一列的总和吗? - In Excel can I write a formula that will calculate the sum of a column based on the contents of another column? Excel公式每5行求和 - Excel formula to Sum every 5 rows 我可以将公式用作SUM参数吗 - Can I use formula as a SUM argument Excel公式每3行求和12行 - Excel formula to Sum 12 rows every 3 rows 是否存在一个可以将一个单元格中的一个字符串到另一个单元格中的所有蓝色字体数字求和的excel公式? - Is there an excel formula that I can use to sum all blue font numbers from a string in one cell to another? 如何有条件地选择数学公式来计算 Excel 中的值? - How can I conditionally choose a math formula to calculate a value in Excel? 我需要一个 excel 公式,可以计算补货或轻拍测试量 - I need an excel formula that can calculate the restock or pat test amounts 在Excel中,我可以使用什么公式在一个单元格中重复文本,并在连续的行中重复指定的时间? - In Excel, what formula can I use to repeat text in one cell, for a specified amount of times in consecutive rows?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM