Skip to main content
 

How to replace blank space with nothing/underscore/dash/comma in Excel?

Author: Kelly Last Modified: 2024-08-29

This article is talking about replacing all blank spaces with underscore/dash/comma or nothing from selection, multiple worksheets, or multiple workbooks easily in Excel.


Replace blank space with nothing/underscore/dash/comma with Find and Replace feature

This method will apply the Find and Replace feature to replace blank spaces with nothing or underscore/dash/comma from selected cells easily.

1. Select the range you will replace the blank spaces, and press the Ctrl + H keys at the same time to open the Find and Replace dialog box.

Note: You can also open the Find and Replace dialog box by clicking Home > Find & Select > Replace.

2. In the opening Find and Replace dialog box, please do as follows:
(1) In the Find what box, please type a space;
(2) In the Replace with box, type underscore/dash/comma as you need. (To replace blank space with nothing, please keep this box blank);
(3) Click the Replace All button.
specify the options in the Find and Replace dialog box

3. And then a dialog box pops up and shows the total number of replacements it has made. Just Click the OK button to close it. And then close the Find and Replace dialog box.
a dialog box pops up and shows the total number of replacements

And then you will see all blank spaces are replaced with the specified comma/dash/underscore or nothing based on your configuration. See screenshot:
all blank spaces are replaced with the specified character


Replace blank space with nothing/underscore/dash/comma in multiple worksheets/workbooks

click Kutools > Navigation Pane > Advanced Find and Replace

For example you have many worksheets with similar data from different workbooks, and you need to batch replace all blank spaces with nothing/underscore/dash/comma from these workbooks.

Apart from replacing in each workbook manually, Kutools for Excel’s Advanced Find and Replace utility can help you batch replace in multiple worksheets and workbooks easily.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Enhanced with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Open all workbooks you will make replacements in, and click Kutools > Navigation Pane > Advanced Find and Replace button Find and Replace button to activate the Advanced Find and Replace pane. See screenshot:

2. In the Advanced Find and Replace pane, go to the Replace tab, and:

set options in the Find and Replace pane

(1) In the Find what box, please type a space;
(2) In the Replace with box, type underscore/dash/comma as you need. (To replace blank space with nothing, please keep this box blank);
(3) Specify the replacing scope from the Within drop down list;
Specify the replacing scope

Note: If you select Selected Sheets from the Within drop down list, all worksheets of opening workbooks are listing in the Workbooks box. And then you need to check the worksheets in the Workbooks box.

3. Click the Replace All button.

And then all blank spaces are replaced with nothing or specified underscore/dash/comma from the specified worksheets and workbook at once.

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy a full-featured 30-day FREE trial with no credit card required! Get It Now


Demo: Replace blank space with nothing/underscore/dash/comma in multiple worksheets/workbooks

 

Related articles:

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


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!