[英]Excel functions with dynamic range
So I am creating a .csv file with data I want to plot in excel, however I want to plot the sum of them.所以我正在创建一个 .csv 文件,其中包含我想在 excel 中绘制的数据,但是我想绘制它们的总和。 eg
例如
set 1:设置 1:
0 5 6 67
5 6 1 0
set2:集2:
8 5 4 664
1 2 5 694
6 4 1 545
So I want the sum of each column in set1 as a row in the end and the sum of each column in set2 at the end.所以我希望 set1 中每列的总和作为最后的一行,最后是 set2 中每列的总和。 But the problem is that set1 and set2 might have a different number of rows.
但问题是 set1 和 set2 的行数可能不同。
Is there any easy FORMULA that I can export with the .csv to do so in excel?是否有任何简单的公式可以使用 .csv 导出以在 excel 中执行此操作?
I don't know if I understand your question correctly, but you might try this:我不知道我是否正确理解你的问题,但你可以试试这个:
Assuming that the top left number is in Cell A1, you could use the following formula:假设左上角的数字在单元格 A1 中,您可以使用以下公式:
=SUM(OFFSET($A$1, 0, COLUMN()-1, ROW()-1, 1))
Print this into every cell of the last row of your sheet.将此打印到工作表最后一行的每个单元格中。 This way, you have a fixed formula for every cell that works regardless of the number of columns or rows, even when the rows have different lengths.
这样,无论列数或行数如何,每个单元格都有一个固定的公式,即使行的长度不同。
Example for set2: set2 的示例:
8 5 4 664
1 2 5 694
6 4 1 545
15 11 10 1903 <-- formula pasted here
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.