How to replace blank space with nothing/underscore/dash/comma in Excel?
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
- Replace blank space with nothing/underscore/dash/comma in multiple worksheets/workbooks
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.
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.
And then you will see all blank spaces are replaced with the specified comma/dash/underscore or nothing based on your configuration. See screenshot:
Replace blank space with nothing/underscore/dash/comma in multiple worksheets/workbooks
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.
1. Open all workbooks you will make replacements in, and click Kutools > Navigation Pane > Advanced 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:
(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;
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
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!