Skip to main content

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


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.


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 as the below demo shown.
Download and try it now! (30-day free trail)


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.

Before applying Kutools for Excel, please download and install it firstly.

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

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.

  If you want to have a free trial (30-day) of this utility, please click to download it, and then go to apply the operation according above steps.

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 (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations