简体   繁体   English

Google表格-相邻列中显示的每n行的总和

[英]Google Sheets - Sum of every nth row displayed in the adjacent column

I am making a spreadsheet to manage my spending on food at work. 我正在制作一个电子表格来管理我在工作中的食品支出。 At the moment, I am getting the total of every week in the last column, but I would also like to total the spending for the month, something like this, but neater and so I can just drag down the rows instead of manually type it every 4 rows. 目前,我在上一列中获得了每周的总计,但我也想总计一个月的支出, 类似这样,但是比较整洁,因此我可以向下拖动行而不是手动键入每4行。

Thanks for the help! 谢谢您的帮助!

This is easy to manage - its all a question of which cell(s) you choose to select and drag. 这很容易管理-这就是您选择选择并拖动哪个单元格的问题。 Don't just click and drag the cell with the formula; 不要只单击并拖动带有公式的单元格; select the three blank cells as well - then drag four cells down the column. 同时选择三个空白单元格-然后将四个单元格向下拖动到列中。 This will give a formula in every fourth row. 这将在每第四行给出一个公式。


The SUM formula calculates the costs for the first 4 week period. SUM公式计算前4周的费用。 All Good. 都好。

Now, if you select this cell and simply drag it down, then every cell will get a copy of that formula. 现在,如果选择此单元格并简单地将其向下拖动,则每个单元格都将获得该公式的副本。 not good. 不好。
选择每个单元格


But... if you select the first four rows of the first month ( including the blank weeks 1, 2 and 3 ). 但是...如果您选择第一个月的前四行( 包括空白的第1、2和3周 )。 Like this 像这样
选择四个单元格


and then drag all four cells down the column, then only every fourth cell will have a formula and the preceding three cells will be blank. 然后将所有四个单元格向下拖动到该列中,那么只有每四个单元格都有一个公式,而前面的三个单元格将为空白。
单击并拖动四行

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

相关问题 如何在Google表格的列中的每第N行插入一个具有值的单元格 - How to insert a cell with value on every Nth row in a column in Google Sheets Google 表格 - 对列中的每一行执行 VLOOKUP 并返回总和 - Google Sheets - Perform VLOOKUP on every row in column and return sum 如何在不取第 N 列(N 取决于行号)的情况下对 Google 表格中的一行求和? - How to sum a row in google sheets without taking the Nth column (N depending on the row number)? 谷歌表格每隔 n 行引用另一张表格 - Google Sheets referencing another sheet every nth row 向Google表格中的查询添加SUM行和SUM列 - Adding a SUM row and SUM column to a query in Google Sheets 如何在Apps Script / Google表格中的最后一个单元格开始自动填充到相邻列的最后一行? - How to start autofill at last cell in one column to last row of adjacent column in Apps Script/Google Sheets? 对一行中的每个第 n 个单元格进行无限求和 - Sum every nth cell in a row infinitely 按列对 Google 表格中每一行的最小值求和 - Sum column wise the min values of each row in Google Sheets 将 Google 工作表列与 arrayformula 中的当前行相加 - sum a Google sheets column up to current row in arrayformula 按日期范围过滤,并按列汇总行值(在Google表格中) - Filter by Date range and sum Row values by Column (in Google Sheets)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM