在Excel中填写空白单元格以完成表格

If you've imported data into Excel, you might need to clean it up before you can use it. Here's how to fill blank cells in Excel to complete a table.

如果您已将数据导入Excel,则可能需要先清理数据,然后才能使用它。 以下是在Excel中填充空白单元格以完成表格的方法。

导入表中缺少数据 (Missing Data in Imported Table)

For example, your imported data might have Region headings in column A, Employee subheadings in column B, and sales data in columns C and D.

例如,您导入的数据可能在A列中具有Region标题,在B列中具有Employee子标题,而在C和D列中具有销售数据。

FillBlank01

If you want to filter or sort this data, you need to fill in the blanks in columns A and B, by copying each heading into the blank cells below it.

如果要过滤或排序此数据,则需要通过将每个标题复制到其下方的空白单元格中来填充A和B列中的空白。

选择空单元格 (Select the Empty Cells)

To select the empty cells, use Excel's built in feature:

要选择空单元格,请使用Excel的内置功能:

  • Select columns A and B, that contain the blank cells.

    选择包含空白单元格的列A和B。
  • On the Ribbon's Home tab, click Find & Select

    在功能区的“主页”选项卡上,单击“查找并选择”
  • Click Go To Special

    单击转到特殊
FillBlanks02
  • In the Go To Special dialog box, click Blanks, then click OK

    在转到特殊对话框,单击空白,然后单击确定

输入公式 (Enter a Formula)

To copy the value from the first heading above each blank cell, you can enter a formula.

要从每个空白单元格上方的第一个标题复制值,可以输入一个公式。

  • With the blank cells selected, type an equal sign, to start the formula.

    选择空白单元格后,键入等号以启动公式。
  • On the keyboard, press the up arrow. This enters a reference to the cell above – cell A2 in this example.

    在键盘上,按向上箭头。 这将输入对上面单元格的引用-在此示例中为单元格A2。
FillBlank02
  • Press the Ctrl key and tap the Enter key, to enter the formula in all the selected cells.

    按Ctrl键并点击Enter键,以在所有选定的单元格中输入公式。

将公式更改为值 (Change the Formulas to Values)

Before you sort or filter the data, change the formulas to values. Otherwise, you'll end up with a mess.

在对数据进行排序或过滤之前,请将公式更改为值。 否则,您将陷入混乱。

Note: Do this carefully if other cells in the columns contain formulas. You don't want to accidentally change those formulas to values.

注意:如果列中的其他单元格包含公式, 仔细执行此操作。 您不想意外地将这些公式更改为值。

  1. Select the columns where you filled in the blanks with formulas

    选择您用公式填充空白的列
  2. On the Ribbon's Home tab, click Copy.

    在功能区的“主页”选项卡上,单击“复制”。
  3. Click Copy

    点击复制
  4. With the columns still selected, click the drop down arrow on the Paste command

    在仍选中列的情况下,单击“粘贴”命令上的下拉箭头
  5. Click Paste Values

    单击粘贴值

The blank cells are now filled in with values, and you can safely sort or filter the list.

现在,空白单元格已填充值,您可以安全地对列表进行排序或过滤。

用宏填充空白单元格 (Fill Blank Cells With a Macro)

If filling blanks is something that you do frequently, you can automate the process with a macro. There's sample code, by Dave Peterson, on my website: Fill Blank Cells Programmatically

如果您经常需要填写空白,则可以使用宏自动执行该过程。 在我的网站上有Dave Peterson的示例代码:以编程方式填充空白单元格

在Excel 2003中填充空白单元格 (Fill Blank Cells in Excel 2003)

This short video shows how to fill in the blank cells in Excel 2003.

这个简短的视频演示了如何在Excel 2003中填写空白单元格。

演示地址

翻译自: https://contexturesblog.com/archives/2009/08/31/fill-blank-cells-in-excel-to-complete-a-table/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值