Skip to main content

How to fill blank cells with 0 or other specific value in Excel?

Supposing you have a large worksheet which is populated with hundreds of blank cells, and now you would like to fill the blank cells with a specific value you like, such as the number of 0. Of course, you can fill them manually or copy and paste one by one, but this is not a good choice for filling large blank cells. Today, I will introduce you some quick tricks to solve this problem.

Fill blank cells with 0 or other specific value with Go To Special function

Fill blank cells with 0 or other specific value with VBA code

Fill blank cells with 0 or other specific value quickly with Kutools for Excel

Fill blank cells with value above / below / right / left with Kutools for Excel


arrow blue right bubble Fill blank cells with 0 or other specific value with Go To Special function

With Go To Special function, you can fill blank cells with whatever values you want.

1. Select the range that you want to fill blank cells.

2. Click Home > Find & Select > Go To Special…to open the Go To Special dialog box. Then choose Blanks option from Select section. See screenshot:

doc-fill-cells-with-0-1-1

3. Then click OK. All of the blank cells will be selected. Please don’t do anything just input the number or text you want, and then press Ctrl + Enter keys together, and all of the blank cells have been filled with the text “null”. See screenshots:

doc-fill-cells-with-0-2-2  2 doc-fill-cells-with-0-3-3

Of course you can fill these selected blank cells with the number of 0 too.


arrow blue right bubble Fill blank cells with 0 or other specific value with VBA code

Also you can apply the following VBA code to fill blank cells with specific value. Please do as follows:

1. Highlight the range contains multiple blank cells.

2. Click Developer > Visual Basic, a new Microsoft Visual Basic for applications window will be displayed, click Insert > Module, then copy and paste the following code into the Module:

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. Click doc-multiply-calculation-3 button to run the code, and a prompt box will appear. You can input any value into the blank box that you need. See screenshot:

doc-fill-cells-with-0-4-4

Tips: If you need to fill blank cells with the number of 0, you need to enter the 0 in this dialog box.

4. And then click OK to end this procedure. And the specified value has been inserted into the blank cells at once.


arrow blue right bubble Fill blank cells with 0 or other specific value quickly with Kutools for Excel

If you have installed Kutools for Excel, its Fill Blank Cells…function can help you to quickly and conveniently fill blank cells with values, with linear values or with fixed value.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days

After installing Kutools for Excel, please do as follows:

1. Click Kutools > Insert > Fill Blank Cells, see screenshot:

2. Select the range that you want to fill the blank cells, and in the Fill Blank Cells dialog box,check Fixed Value from the Fill With option and enter the specific value or text in the Filled Value box, see screenshot:

doc-fill-cells-with-0-6-6

3. Then click OK or Apply. All of the blank cells have been filled with the specified value. see screenshots:

doc-fill-cells-with-0-7-7  2 doc-fill-cells-with-0-8-8

Click to Download and free trial Kutools for Excel Now!


arrow blue right bubble Fill blank cells with value above / below / right / left with Kutools for Excel

If you want to fill the blank cells with value above or below, the Kutools for Excel’s Fill Blank Cells also can do you a favor. Please do as follows:

1. Select the data range that you want to fill the blanks with value above, and enable the Fill Blank Cells feature.

2. In the Fill Blank Cells dialog box, select Based on values option under the Fill with section, and then choose the options that you want to fill the blank cells, you can fill them down, up, right and left as you need, see screenshot:

doc-fill-cells-with-0-10-10

3. And then click Ok or Apply button, and the blank cells have been filled with the data above, see screenshots:

doc-fill-cells-with-0-11-11  2 doc-fill-cells-with-0-12-12

Click to Download and free trial Kutools for Excel Now!

With this Fill Blank Cells utility, you can also fill blank cells with linear values, click here to know more.


arrow blue right bubbleFill blank cells with value above / linear values / specific value

Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days. Download and free trial Now!

Related articles:

Fill blank cells with linear values

Fill blank cells with value above

Best Office Productivity Tools

Supports Office/Excel 2007-2021 and 365  |  Available in 44 Languages  |  Easy to Uninstall Completely

Popular Features: Find/Highlight/Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns     Move Columns   |   Unhide Columns   |   Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need Is Just A Click Away...

Supercharge Your Excel Skills: Experience Efficiency Like Never Before with Kutools for Excel  (Full-Featured 30-Day Free Trial)

kte tab 201905

60-Day Unconditional Money-Back GuaranteeRead More... Free Download... Purchase... 

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day! (Full-Featured 30-Day Free Trial)
60-Day Unconditional Money-Back GuaranteeRead More... Free Download... Purchase... 
 
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 --
This comment was minimized by the moderator on the site
it's very useful. Thank you so much!!!
This comment was minimized by the moderator on the site
thank you so much. The trick is really good!!!
This comment was minimized by the moderator on the site
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: "Go To Special" Shortcut: ctrl + g. Someone else might find useful as well.
This comment was minimized by the moderator on the site
These tools are very useful. I really wonder about the solutions provided by them. It will save lot of time. Thanks.
This comment was minimized by the moderator on the site
how to multipale rows unmerge
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
So helpful! Saved me so much time! Thank you!!
This comment was minimized by the moderator on the site
Thanks for the tips. I Also wanna thank my private genius Ohad!
This comment was minimized by the moderator on the site
Amazing! Thank you! Saved me SO much time! Had to fill many many blanks with 0s to correctly analyse my data, life saver!
This comment was minimized by the moderator on the site
Perfect instructions, very easy to follow, saved me loads of time cleaning up several sheets. Thank you!
This comment was minimized by the moderator on the site
its very easy and productive by using Go To Special function . Thanks... :-)
This comment was minimized by the moderator on the site
garcinia cambogia extract weight loss results She is to make pill ddcgdkcbddcdcdef
This comment was minimized by the moderator on the site
Thank you for the tutorial. Really helpful.
This comment was minimized by the moderator on the site
Thank you for this - Using Go To Special function to fill blank cells with 0 or other specific value :lol:
This comment was minimized by the moderator on the site
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
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations