vba 如何对excel中的每一行求和?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6690117/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 11:38:28  来源:igfitidea点击:

how to to sum each rows in excel?

excelexcel-vbavba

提问by zhuanzhou

how to make the formula effect on the whole sheet.

如何使公式对整个工作表产生影响。

the format is : get each lines number sum. then substract some numbers.

格式为:获取每行编号总和。然后减去一些数字。

eg: there are 100 lines records. how to make the formula effects on each lines?

例如:有 100 行记录。如何使每行的公式效果?

namely : A1+B1+C1+D1+....equals a number, then using the number-20 -15....

即: A1+B1+C1+D1+....等于一个数字,然后使用数字-20 -15....

each line using the same way, thank you.

每行使用相同的方式,谢谢。

回答by Jacob

You can input a range into =SUM()like this:

您可以=SUM()像这样输入一个范围:

=SUM(A1:X1)

This calculates the sum of the 1. line from A to X. Just copy/paste the formula to ther rows to calculate the some for those.

这将计算从 A 到 X 的 1. 行的总和。只需将公式复制/粘贴到行中即可计算出这些行。

回答by seriouslee

Drag the sum down in corner of cell where cursor becomes +sign

将光标变为+符号的单元格角落的总和向下拖动