Skip to main content

How to fill blank cells with dash in Excel?

Supposing you have a range of data which contains some blank cells, and now, you want to fill each of these blank cells with the dash symbol as following screenshots shown, do you have any good ideas to fill the blank cells with dashes at once in Excel?

doc fill blank dash 1  2 doc fill blank dash 2

Fill blank cells with dashes by using Go To Special

Fill blank cells with dashes by using Find and Replace function

Fill blank cells with dashes by using VBA code

Fill blank cells with dashes by using Kutools for Excel


If you are familiar with the Go To Special feature of Excel, you can select all blank cells first, and then fill them with dashes at once. Please do as follows:

1. Select the range that you need to fill the blanks with dashes.

2. Then click Home > Find & Select > Go To Special, in the Go To Special dialog box, check Blanks option, see screenshots:

doc fill blank dash 3  2 doc fill blank dash 4

3. Then click OK, and all blank cells have been selected as following screenshot shown:

doc fill blank dash 5

4. And then enter the dash into the cell and press Ctrl + Enter keys together, all the blank cells have been filled with dashes at the meanwhile, see screenshot:

doc fill blank dash 6


Fill blank cells with dash or any other specific values

Kutools for Excel’s Fill Blank Cells feature can help you to fill blank cells with value above, with liner values, with specific values as you need. Click to download Kutools for Excel!

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!


In Excel, the Find and Replace function also can do you a favor.

1. Select the data range that you want to use, and press Ctrl + H keys to open the Find and Replace dialog box, see screenshot:

doc fill blank dash 7

2. In the Find and Replace dialog, in the Find what text box, nothing to enter and leave it blank, in the Replace with text box, type the dash character, see screenshot:

doc fill blank dash 8

3. And then click Replace All button to replace the blanks with dashes, then a dialog mentions you that how many cells have been replaced. see screenshot:

doc fill blank dash 9

4. Then click OK and close the Find and Replace dialog.


The following VBA code also can help you to fill blank cells with dashes.

1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Fill blank cells with dashes

Sub ChangeBlank()
'Update by Extendoffice
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
    If Rng.Value = "" Then
        Rng.Value = "-"
    End If
    Rng.HorizontalAlignment = xlCenter
Next
End Sub

3. Then press F5 key to run this code, and a prompt box will pop out to select the data range that you want to use, see screenshot:

doc fill blank dash 10

4. And then click OK, all the blank cells are filled with the dashes immediately.


If you have Kutools for Excel, the Fill Blank Cells can help you fill the blank cells based on the values above or below, fill the values linearly, and fill blanks with a specific 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. Select the range that you want to fill the blanks with dashes.

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

3. In the Fill Blank Cells dialog, select Fixed value under Fillwith section, and enter the dash (-) into the Filled value text box, see screenshot:

doc fill blank dash 12

4. And then click OK or Apply, all blank cells have been filled with the dashes in the selection.

To know more details about this Fill Blank Cells feature.

With this Fill Blank Cells tools, you can also do the following tasks:

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

How to fill blank cells with value above in Excel?

Download and free trial Kutools for Excel Now !


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!

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or 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  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
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

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


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