Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to find and replace all blank cells with certain number or text in Excel?

For a range of cells which are populated with some blank cells, you may need to find these blank cells and replace them with certain content. In this article, we provide three methods for you.

Find and replace all blank cells with Find and Replace function

Find and replace all blank cells with VBA code

Easily fill all blank cells in a range with Kutools for Excel


Easily fill all blank cells with certain value in Excel:

Kutools for Excel's Fill Blank Cells utility helps you easily fill all blank cells in selected range with certain number or text in Excel.

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


Find and replace all blank cells with Find and Replace function


You can use the Find and Replace function to replace all blank cells with certain content in Excel. Please do as follows.

1. Select the range with blank cells you need to replace with certain content, then press Ctrl + H keys simultaneously to open the Find and Replace dialog box.

2. In the popping up Find and Replace dialog box, under the Replace tab, keep the Find what box blank, enter the certain text you want to replace the blank cells into the Replace with box, and finally click the Replace All button. See screenshot:

3. Click the OK button in the following dialog box.

Then all blank cells in selected range are replaced with certain content.


Find and replace all blank cells with VBA code

You can also apply the VBA method to replace all blank cells with certain content in a range. Please do as follows.

1. Press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Application window.

2. In the Microsoft Visual Basic for Application window, click Insert > Module, and then copy and paste below VBA code into the Module window.

VBA code: Replace blank cells with certain content

Sub Replace_Blanks()
	Dim xStr As String
	Dim xRg As Range
	Dim xCell As Range
	Dim xAddress As String
	Dim xUpdate As Boolean
	On Error Resume Next
	xAddress = Application.ActiveWindow.RangeSelection.Address
	Set xRg  = Application.InputBox("Please select a range", "Kutools for Excel", xAddress, , , , , 8)
	Set xRg  = xRg.SpecialCells(xlBlanks)
	If (Err <> 0) Or (xRg Is Nothing) Then
		MsgBox "No blank cells found", , "Kutools for Excel"
		Exit Sub
		End If
		xStr = Application.InputBox("Replace blank cells with what?", "Kutools for Excel")
		xUpdate = Application.ScreenUpdating
		Application.ScreenUpdating = False
		For Each xCell In xRg
			xCell.Formula = xStr
		Next
		Application.ScreenUpdating = xUpdate
	End Sub

3. Press the F5 key to run the code. In the Kutools for Excel dialog box, select the range with blank cells you need to find and replace, and then click the OK button.

4. In another Kutools for Excel dialog box, enter the certain content into the textbox, and click the OK button. See screenshot:

Then all blank cells are replaced with certain text immediately as you specified above.

Note: If the selected range does not contain blank cells, you will get the following dialog box.


Easily fill all blank cells in a range with Kutools for Excel

The Fill Blank Cells utility of Kutools for Excel helps you easily fill all blank cells with certain content. Please do as follows.

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

1. Select the range with blank cells you need to fill with certain content, and then click Kutools > Insert > Fill Blank Cells. See screenshot:

2. In the Fill Blank Cells dialog box, check the Fixed value option in the Fill with section, and then enter the certain content into the Filled value box, finally click the OK button.

Then all blank cells in selected range are filled with the content as below screenshot shown.

Note: With this utility, you can also fill blank cells based on values, and fill blanks with linear values.

Tip.If you want to have a free trial of this utility, please go to download the software freely first, and then go to apply the operation according above steps.



Recommended Productivity Tools for Excel

Kutools for Excel Helps You Always Finish Work Ahead of Time, and Stand Out From Crowd

  • More than 300 powerful advanced features, designed for 1500 work scenarios, increasing productivity by 70%, give you more time to take care of family and enjoy life.
  • No longer need memorizing formulas and VBA codes, give your brain a rest from now on.
  • Become an Excel expert in 3 minutes, Complicated and repeated operations can be done in seconds, 
  • Reduce thousands of keyboard & mouse operations every day, say goodbye to occupational diseases now.
  • 110,000 highly effective people and 300+ world-renowned companies' choice.
  • 60-day full features free trial. 60-day money back guarantees. 2 years of free upgrade and support.

Brings Tabbed Browsing and Editing to Microsoft Office, Far More Powerful Than The Browser's Tabs

  • Office Tab is designed for Word, Excel, PowerPoint and Other Office Applications: 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!
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.

Be the first to comment.