跳到主要内容

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

假设您有一个很大的工作表,该工作表中填充了数百个空白单元格,现在您要用所需的特定值(例如0的数字)填充空白单元格。当然,您可以手动填充它们或复制并一张一张地粘贴,但这不是填充大空白单元格的好选择。 今天,我将向您介绍一些解决该问题的快速技巧。

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

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

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

使用 Kutools for Excel 填充空白单元格上方/下方/右/左的值


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

定位条件 函数,您可以用所需的任何值填充空白单元格。

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

2。 点击 主页 > 查找和选择 > 去Specia我…打开 定位条件 对话框。 然后选择 空白 选项 选择 部分。 看截图:

文档填充单元格与 0-1-1

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

文档填充单元格与 0-2-2 2 文档填充单元格与 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. 点击 文档乘法计算 3 按钮运行代码,将出现一个提示框。 您可以在所需的空白框中输入任何值。 看截图:

文档填充单元格与 0-4-4

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

4。 然后点击 OK 结束此过程。 并将指定的值立即插入到空白单元格中。


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

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

Kutools for Excel : 带有300多个便捷的Excel加载项,可以在30天内免费试用

安装后 Kutools for Excel,请执行以下操作:

1. 点击 库工具 > 插页 > 填充空白单元格,请参见屏幕截图:

2. 选择要填充空白单元格的范围,然后在 填充空白单元格 对话框,检查 固定值 来自 填充 选项,然后在 实值 框,请参见屏幕截图:

文档填充单元格与 0-6-6

3。 然后点击 OK or 使用。 所有空白单元格均已填充指定的值。 看截图:

文档填充单元格与 0-7-7 2 文档填充单元格与 0-8-8

单击立即下载并免费试用 Kutools for Excel!


箭头蓝色右气泡 使用 Kutools for Excel 填充空白单元格上方/下方/右/左的值

如果您要使用大于或小于该值填充空白单元格, Kutools for Excel填充空白单元格 也可以帮个忙。 请执行以下操作:

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

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

文档填充单元格与 0-10-10

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

文档填充单元格与 0-11-11 2 文档填充单元格与 0-12-12

单击立即下载并免费试用 Kutools for Excel!

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


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

Kutools for Excel:具有300多个方便的Excel加载项,可以在30天内免费试用,没有任何限制。 立即下载并免费试用!

相关文章:

用线性值填充空白单元格

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

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (26)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you so much for your great website. It helps me a lot in my Excel works!
This comment was minimized by the moderator on the site
Hello,
You are welcome. Glad it helps. Any questions, please feel free to contact us. Have a great day.
Sincerely,
Mandy
This comment was minimized by the moderator on the site
You are genius! It was soooo helpful. Thank you so much
This comment was minimized by the moderator on the site
This helped me - Thank you.
This comment was minimized by the moderator on the site
Artikelnya sangat bagus
This comment was minimized by the moderator on the site
Thanks.. Much useful..
This comment was minimized by the moderator on the site
thanks a lot for saving the time :)
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
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?
This comment was minimized by the moderator on the site
Hi It's very useful. Thank you very much.
This comment was minimized by the moderator on the site
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 --
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations