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.

Using Go To Special function to fill blank cells with 0 or other specific value

Using VBA code to fill blank cells with 0 or other specific value

Using Kutools for Excel easily to fill blank cells with 0 or other specific value

Kutools for Excel: add 120 new features in Excel. Save one hour every day.
Classic Menu for Office: brings back classic menus to Office 2010 and 2013 (includes Office 365).
Office Tab: brings tabbed interface to Office as the use of web browser Chrome, Firefox and Internet Explorer.

Hot
Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

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

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

3. Then click OK. All of the blank cells will be selected. Then don’t do anything just input the number or text you want into the active cell. See screenshot:

doc-fill-cells-with-0-2

4. And then press Ctrl + Enter, and all of the blank cells have been filled with the text “null”. See screenshot:

doc-fill-cells-with-0-3

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


arrow blue right bubble Using VBA code to fill blank cells with 0 or other specific value

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()
'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 = InputBox("Enter value that will fill empty cells in selection", _
"Fill Empty Cells")
'Test for empty cell. If empty, fill cell with value given
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. For example, I input “empty” into it. See screenshot:

doc-fill-cells-with-0-4

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.


arrow blue right bubble Using Kutools for Excel easily to fill blank cells with 0 or other specific value

Kutools for Excel: with more than 120 handy Excel features, free to try with no limitation in 45 days. Get it Now

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.

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

doc-fill-cells-with-0-8

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-5

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

doc-fill-cells-with-0-6
-1
doc-fill-cells-with-0-7

If you enter the number of 0 in the input box of Fill value, all blank cells will be filled with 0 in the selection.

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


Related articles:

Fill blank cells with linear values

Fill blank cells with value above


Kutools for Excel

More than 120 Advanced Functions for Excel 2013, 2010, 2007 and Office 365.

screen shot

btn read more     btn download     btn purchase

Comments  

0#Norfolk2013-10-22 03:23
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
Reply | Reply with quote | Quote
0#Sherri2013-10-30 20:25
Thank you for this - Using Go To Special function to fill blank cells with 0 or other specific value:lol:
Reply | Reply with quote | Quote
+1#Karthik Srinivasan2013-12-09 11:51
Thank you for the tutorial. Really helpful.
Reply | Reply with quote | Quote
0#Smithe6462014-06-02 14:58
garcinia cambogia extract weight loss results She is to make pill ddcgdkcbddcdcdef
Reply | Reply with quote | Quote

Add comment


Security code
Refresh