填写 - Google Apps 电子表格脚本 [英] Fill down - Google Apps Script for Spreadsheets

查看:51
本文介绍了填写 - Google Apps 电子表格脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个函数可以将数据填充到上一行的所有空单元格?

Is there a function that can fill down data to all empty cells from the row above?

如果没有,谁能帮助我使用 Google Apps 脚本(或其他解决方案),它可以遍历我的谷歌电子表格中的每一行,检查空单元格,如果找到,用上面一行的数据填充它们?

If not, could anyone help me out with a Google Apps Script (or other solution) that can go through every row in my google spreadsheet, check for empty cells, and if found, fill them in with data from the row above?

这样的功能应该已经包含在我认为的电子表格程序中(以及填充").

Such a function should be already included in a spreadsheet program I think (and "fill up" as well).

谢谢!

推荐答案

这样的功能应该已经包含在电子表格程序中了我思考(以及填满").

Such a function should be already included in a spreadsheet program I think (and "fill up" as well).

我将尝试描述 GSheets 中与此相关的原生功能.

I'll attempt to describe the native functionality in GSheets pertaining to this.

  1. 如果您双击所选单元格或区域右下角的蓝色小方块,这将自动填充该单元格直到左侧填充单元格块的末尾.或者,您只需拖动这个蓝色小框(向下、向上、向左或向右)即可自动填充.

  1. If you double-click the little blue square on the bottom-right of a selected cell or range, this will automatically fill that cell down to the end of a block of populated cells on the left. Alternatively, you can just drag this little blue box (down, up, left or right) to auto-fill.

您可以选择源单元格及其下方的单元格(请参阅第 4 点),然后按 Ctrl+Enter,向下填充.您也可以使用 Ctrl+EnterCtrl+R 向右填充.

You can select the source cell and cells underneath it (refer to point 4), and then press Ctrl+Enter, to fill down. You can also use Ctrl+Enter or Ctrl+R to fill right.

您可以选择源单元格,按 Ctrl+C 复制,然后选择上面的单元格(或左侧 - 再次参考第 4 点),然后按 Ctrl+V 进行粘贴.这具有填充(或离开)的效果.

You can select the source cell, press Ctrl+C to copy, then select cells above (or to the left - and again refer to point 4), and then press Ctrl+V to paste. This has the effect of filling up (or left).

您可以通过按 Ctrl+Shift+向下(或向上、向右或向左).这将带您到工作表的限制或下一个填充的单元格.如果是后者,则可以按 Shift+Up(或向下、向左或向右)返回到最后一个空白单元格.然后按照第2点和第3点的要求填写.

You can quickly select blank cells under (or over, or right of, or left of) the source cell by pressing Ctrl+Shift+Down (or Up, or Right, or Left). This will take you to either the limit of the sheet, or the next populated cell. If the latter, you can then press Shift+Up (or Down, or Left, or Right) to back-track to the last blank cell. And then fill as required as per points 2 and 3.

您需要为每个不连续的空白单元格组执行此操作.如果您希望能够快速自动填充不连续的空白单元格组,那么是的,需要一个脚本.

You will need to do this for each non-contiguous group of blank cells. If you want to be able to quickly auto-fill non-contiguous groups of blank cells, then yes, a script would be required.

这篇关于填写 - Google Apps 电子表格脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆