提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何在Excel中用0或其他特定值填充空白单元格?

假设您有一个填充了数百个空白单元格的大型工作表,现在您希望用您喜欢的特定值填充空白单元格,例如0的数量。 当然,您可以手动填充它们或者一个接一个地复制和粘贴,但这不是填充大空白单元格的好选择。 今天,我会向你介绍一些快速的技巧来解决这个问题。

使用转到特殊功能,用0或其他特定值填充空白单元格

使用VBA代码填充0或其他特定值的空白单元格

使用Kutools for Excel快速填充0或其他特定值的空白单元格

使用Kutools for Excel填充空白单元格的值高于/低于/向右/左


使用0或任何其他特定值填充空白单元格:

Kutools for Excel填充空白单元格 功能可以帮助您使用上面的值填充空白单元格,使用班轮值,并根据需要使用特定值。

DOC填充细胞与 -  0-9,9

Kutools for Excel:比200方便的Excel加载项,可以在60天免费试用。 下载并免费试用现在!



箭头蓝色右泡 使用转到特殊功能,用0或其他特定值填充空白单元格

您订购的 去特别 函数,你可以用任何你想要的值来填充空白单元格。

1。 选择您想要填充空白单元格的范围。

2。 点击 主页 > 查找和选择 > 去Specia我...打开 去特别 对话框。 然后选择 空白 选项 选择 部分。 看截图:

DOC填充细胞与 -  0-1,1

3。 然后点击 OK。 所有的空白单元格将被选中。 请不要做任何事情,只需输入您想要的数字或文字,然后按 Ctrl + Enter 键在一起,并且所有空白单元格都被填充了文本“null”。 查看截图:

DOC填充细胞与 -  0-2,2  2 DOC填充细胞与 -  0-3,3

当然,您也可以使用0的编号填充这些选定的空白单元格。


箭头蓝色右泡 使用VBA代码填充0或其他特定值的空白单元格

您也可以应用以下VBA代码来填充具有特定值的空白单元格。 请做如下操作:

1. 突出显示范围包含多个空白单元格。

2. 点击 开发人员 > Visual Basic中,一个新的 Microsoft Visual Basic的应用程序 窗口将会显示,点击 插页 > 模块,然后将以下代码复制并粘贴到模块中:

Sub FillEmptyBlankCellWithValue()
Dim cell As Range
Dim InputValue As String
On Error Resume Next
InputValue = InputBox("Enter value that will fill empty cells in selection", _
"Fill Empty Cells")
For Each cell In Selection
If IsEmpty(cell) Then
cell.Value = InputValue
End If
Next
End Sub

3. 点击 DOC-乘法计算-3 按钮来运行代码,并出现一个提示框。 您可以输入任何值到您需要的空白框中。 看截图:

DOC填充细胞与 -  0-4,4

提示: 如果您需要使用0编号填充空白单元格,则需要在此对话框中输入0。

4。 然后点击 OK 结束这个过程。 并且指定的值一次插入到空白单元格中。


箭头蓝色右泡 使用Kutools for Excel快速填充0或其他特定值的空白单元格

如果你已经安装 Kutools for Excel,它的 填充空白单元格...函数可以帮助您快速方便地使用线性值或固定值填充具有值的空白单元格。

Kutools for Excel : 与超过300方便的Excel加载项,在60天免费试用没有限制.

安装后 Kutools for Excel请按照以下步骤进行:

1. 点击 Kutools > 插页 > 填充空白单元格,看截图:

DOC填充细胞与 -  0-5,5

2. 选择要填充空白单元格的区域,然后在 填充空白单元格 对话框,检查 固定值 来自 填充 选项,并在中输入具体的值或文本 实现价值 框中,看截图:

DOC填充细胞与 -  0-6,6

3。 然后点击 OK or 申请。 所有空白单元格都已填入指定值。 看截图:

DOC填充细胞与 -  0-7,7  2 DOC填充细胞与 -  0-8,8

点击下载并免费试用Kutools for Excel Now!


箭头蓝色右泡 使用Kutools for Excel填充空白单元格的值高于/低于/向右/左

如果你想填充空白单元格的值高于或低于,值 Kutools for Excel填充空白单元格 也可以帮你一个忙。 请做如下操作:

1。 选择要用上面的值填充空白的数据范围,并启用该值 填充空白单元格 功能。

2。 在 填充空白单元格 对话框中选择 基于价值 选项下 填充 部分,然后选择要填充空白单元格的选项,可以根据需要填充它们,向上,向左和向右,请参阅截图:

DOC填充细胞与 -  0-10,10

3。 然后点击 Ok or 申请 按钮,空白单元格已填充上面的数据,请参阅截图:

DOC填充细胞与 -  0-11,11  2 DOC填充细胞与 -  0-12,12

点击下载并免费试用Kutools for Excel Now!

有了这个 填充空白单元格 实用程序,您还可以使用线性值填充空白单元格, 点击这里了解更多.


箭头蓝色右泡用高于/线性值/特定值的值填充空白单元格

Kutools for Excel:比200方便的Excel加载项,可以在60天免费试用。 下载并免费试用现在!


相关文章:

用线性值填充空白单元格

用上面的值填充空白单元格


Kutools for Excel解决了您的大多数问题,并使您的生产率提高了80%

  • 重用: 快速插入 复杂的公式,图表 以及你以前用过的任何东西; 加密单元格 密码; 创建邮件列表 并发送电子邮件...
  • 超级方程式酒吧 (轻松编辑多行文字和公式); 阅读布局 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不丢失数据; 分裂细胞含量; 组合重复的行/列...防止重复的细胞; 比较范围...
  • 选择复制或唯一 行; 选择空行 (所有细胞都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择......
  • 精确复制 多个单元格而不更改公式参考; 自动创建参考 多张表; 插入项目符号,复选框等等......
  • 提取文本,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级过滤器 (将过滤方案保存并应用到其他工作表); 高级排序 按月/周/日,频率等; 特殊过滤器 用粗体,斜体......
  • 结合工作簿和工作表; 根据键列合并表; 将数据拆分为多个表格; 批量转换xls,xlsx和PDF...
  • 超过300强大的功能。 支持Office / Excel 2007-2019和365。 支持所有语言。 在您的企业或组织中轻松部署。 全功能30天免费试用。
kte tab 201905

Office选项卡为Office提供选项卡式界面,使您的工作更轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,Publisher,Access,Visio和Project。
  • 在同一窗口的新选项卡中打开并创建多个文档,而不是在新窗口中。
  • 通过50%提高您的工作效率,每天为您减少数百次鼠标点击!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    mutaqinabdullah1 · 7 months ago
    Artikelnya sangat bagus
  • To post as a guest, your comment is unpublished.
    Yogesh · 2 years ago
    Thanks.. Much useful..
  • To post as a guest, your comment is unpublished.
    ghazale · 2 years ago
    thanks a lot for saving the time :)
  • To post as a guest, your comment is unpublished.
    Latifur Rofik · 3 years ago
    boss, for example i make template with excel
    in the template there is no empty field,
    evidently after i download the template i found field with empty value
    nah.... my question
    how if i will insert the empty value with '0' but thats automatic from the template
    thankssss boss your answer very help me please
  • To post as a guest, your comment is unpublished.
    Morgan · 3 years ago
    How would you be able to replicate this within a file containing multiple worksheets - so that it can fill in the blanks of multiple (or all) the worksheets at the same time?
  • To post as a guest, your comment is unpublished.
    Sarband · 3 years ago
    Hi
    It's very useful.
    Thank you very much.
  • To post as a guest, your comment is unpublished.
    adib · 3 years ago
    Hi
    I have problem with inserting specific values existing in a column like (A), to blank cells of another column like (B), automatically.
    because of so many rows, the manual cell filling is very difficult. if possible, please help me. a very short example of my data as follow:
    A B
    3 --
    9 86
    9 87
    17 --
    45 --
    102
    104
    210
    --
    215
    --
  • To post as a guest, your comment is unpublished.
    son · 3 years ago
    it's very useful.
    Thank you so much!!!
  • To post as a guest, your comment is unpublished.
    nara · 3 years ago
    thank you so much. The trick is really good!!!
  • To post as a guest, your comment is unpublished.
    Debbie · 4 years ago
    Thank you very much for the tutorial on: How to fill blank cells with 0 or other specific value in Excel? Was a life-saver in this large workbook Im pressed for time with. It was easy to follow. I would note that not all Excel books have quite the same ribbon labels, ie Find & Select or Edit. I came across: [b] "Go To Special" Shortcut: ctrl + g[/b]. Someone else might find useful as well.
  • To post as a guest, your comment is unpublished.
    Shiva · 4 years ago
    These tools are very useful. I really wonder about the solutions provided by them. It will save lot of time. Thanks.
  • To post as a guest, your comment is unpublished.
    Sandeep Thopte · 4 years ago
    how to multipale rows unmerge
  • To post as a guest, your comment is unpublished.
    Per · 4 years ago
    Is there a way to stop this when reaching two blank cells in column "A"?


    Sub Test()
    'This macro will fill all "blank" cells with the text "Test"
    'When no range is selected, it starts at A1 until the last used row/column
    'When a range is selected prior, only the blank cell in the range will be used.
    On Error GoTo ErrHandler:
    Selection.SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "Test"
    Exit Sub
    ErrHandler:
    MsgBox "No blank cells found", vbDefaultButton1, Error
    Resume Next
    End Sub
  • To post as a guest, your comment is unpublished.
    Kristine · 4 years ago
    So helpful! Saved me so much time! Thank you!!
  • To post as a guest, your comment is unpublished.
    omer · 4 years ago
    Thanks for the tips.
    I Also wanna thank my private genius Ohad!
  • To post as a guest, your comment is unpublished.
    Sophie · 4 years ago
    Amazing! Thank you! Saved me SO much time! Had to fill many many blanks with 0s to correctly analyse my data, life saver!
  • To post as a guest, your comment is unpublished.
    Tara · 5 years ago
    Perfect instructions, very easy to follow, saved me loads of time cleaning up several sheets. Thank you!
  • To post as a guest, your comment is unpublished.
    Anand · 5 years ago
    its very easy and productive by using Go To Special function .
    Thanks... :-)
  • To post as a guest, your comment is unpublished.
    Smithe646 · 5 years ago
    garcinia cambogia extract weight loss results She is to make pill ddcgdkcbddcdcdef
  • To post as a guest, your comment is unpublished.
    Karthik Srinivasan · 6 years ago
    Thank you for the tutorial. Really helpful.
  • To post as a guest, your comment is unpublished.
    Sherri · 6 years ago
    Thank you for this - [b]Using Go To Special function to fill blank cells with 0 or other specific value[/b] :lol:
  • To post as a guest, your comment is unpublished.
    Norfolk · 6 years ago
    For larger areas use the .specicalcells method;

    Sub FillEmptyBlankCellWithValue()
    'Fill an empty or blank cell in selection
    'with value specified in InputBox
    Dim cell As Range
    Dim InputValue As String
    On Error Resume Next
    'Prompt for value to fill empty cells in selection
    InputValue = 0 'InputBox("Enter value that will fill empty cells in selection", _
    "Fill Empty Cells")
    'Test for empty cell. If empty, fill cell with value given
    If Selection.Cells.Count = 1 Then Exit Sub
    With Selection
    .Cells.SpecialCells(xlCellTypeBlanks).Select
    With Selection
    .Cells.Value = 0
    End With
    End With
    'For Each cell In Selection
    'If IsEmpty(cell) Then
    'cell.Value = InputValue
    'End If
    'Next
    End Sub