

➤ After that, write the codes given below: Option Explicit ➤ As a result, the Visual Basic Editor window will appear. ➤ After that, select the View Code option from the context menu. ➤ Then, r ight-click your mouse on the sheet title. ➤ Firstly, select the cells where you will apply VBA. In this last method, we’ll see how to use Excel VBAcodes to remove white spaces. Embedding Excel VBA to Remove White Space Read More: Remove All Spaces in Excel (9 Methods)Ħ.

The CLEAN function will then clean non printable characters if there are remain any and it will return as-įinally, the TRIM function will trim extra spaces and will return as. This function will substitute the extra space with no space. ➤ By activating Cell D5 write the formula given below. The CLEAN function takes a text string and returns text that has been “cleaned” of line breaks and other non-printable characters. Here, we’ll use another combination of functions to remove extra white spaces: the CLEAN, TRIM, and SUBSTITUTE functions. Combining CLEAN, TRIM and SUBSTITUTE Functions to Remove All Spaces from a Cell in Excel


➤And you’ll find that all double spaces are removed now and a notification is showing the operation result. ➤ Additionally, keep the Replace with the bar empty. ➤ Then, click the Space key twice in the Find What bar. ➤ Firstly, press Ctrl+H to open the Find and Replace dialog box. Now we’ll use the Find and Replace tool to remove double white spaces beside the names. Apply the ‘Find And Replace’ Tool to Remove White Space in Excel Read More: How to Remove Spaces in Excel with Formula (5 Quick Ways)Ģ. ➤ Now, use the Fill Handle icon to copy the formula for the other cells. As a result, you will get the following result.
