跳到主要內容

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

假設您有一個很大的工作表,該工作表中填充了數百個空白單元格,現在您要用所需的特定值(例如0的數字)填充空白單元格。當然,您可以手動填充它們或複制並一張一張地粘貼,但這不是填充大空白單元格的好選擇。 今天,我將向您介紹一些解決該問題的快速技巧。

使用轉到特殊功能將0或其他特定值填充到空白單元格

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

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

用Kutools for Excel將空白單元格的上/下/右/左值填充


箭頭藍色右氣泡 使用轉到特殊功能將0或其他特定值填充到空白單元格

這款獨特的敏感免洗唇膜採用 Moisture WrapTM 技術和 Berry Mix ComplexTM 成分, 去特別 函數,您可以用所需的任何值填充空白單元格。

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或其他特定值填充空白單元格

如果你已經安裝 Excel的Kutools,其 填寫空白單元格…功能可以幫助您快速方便地用空白值,線性值或固定值填充空白單元格。

Excel的Kutools : 帶有300多個便捷的Excel加載項,可以在30天內免費試用

安裝後 Excel的Kutools,請執行以下操作:

1. 點擊 庫工具 > 插入 > 填寫空白單元格,請參見屏幕截圖:

2. 選擇要填充空白單元格的範圍,然後在 填寫空白單元格 對話框,檢查 固定值 來自 填充 選項,然後在 實值 框,請參見屏幕截圖:

文檔填充單元格與 0-6-6

3。 然後點擊 OK or 登記。 所有空白單元格均已填充指定的值。 看截圖:

文檔填充單元格與 0-7-7 2 文檔填充單元格與 0-8-8

點擊下載並立即免費試用Excel的Kutools!


箭頭藍色右氣泡 用Kutools for Excel將空白單元格的上/下/右/左值填充

如果您要使用大於或小於該值填充空白單元格, Excel的Kutools填寫空白單元格 也可以幫個忙。 請執行以下操作:

1。 選擇您要使用上面的值填充空白的數據范圍,然後啟用 填寫空白單元格 功能。

2。 在 填寫空白單元格 對話框中選擇 基於價值 選項下 填充 部分,然後選擇要填充空白單元格的選項,可以根據需要向下,向上,向右和向左填充它們,請參見屏幕截圖:

文檔填充單元格與 0-10-10

3。 然後點擊 Ok or 登記 按鈕,空白單元格已填充上面的數據,請參見屏幕截圖:

文檔填充單元格與 0-11-11 2 文檔填充單元格與 0-12-12

點擊下載並立即免費試用Excel的Kutools!

有了這個 填寫空白單元格 實用程序,也可以用線性值填充空白單元格, 點擊這裡了解更多.


箭頭藍色右氣泡用高於/線性值/特定值的值填充空白單元格

Excel的Kutools:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!

相關文章:

用線性值填充空白單元格

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

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為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