How to Remove Characters in Excel (6 Methods)

Here’s an overview of removing characters with various functions.

Overview of removing characters in Excel


Download the Practice Workbook


6 Methods to Remove Characters in Excel


Method 1 – Remove Specific Characters with the Find and Replace Feature

Below is the dataset consisting of Name and their Profession, where the Profession contains unnecessary dots (.), which we’ll remove.

Sample dataset of Removing characters

Steps:

  • Select the dataset.
  • Under the Home tab, go to Find & Select and choose Replace.

Choosing Replace option from Find and Select Option

  • From the pop-up Find and Replace box, in the Find what field, write the dot (.)
  • Leave the Replace with field blank.

Replacing dot sign with blanks

 

  • Press Replace All.

Final output of removed characters using the find and replace feature


Method 2 – Delete Specific Characters with the SUBSTITUTE Function

The SUBSTITUTE Formula,

=SUBSTITUTE(cell, “old_text”, “new_text”)
old_text = the text you want to remove
new_text = the text that you want to replace with

We’ll use the same dataset to remove extra periods.

Sample dataset to remove characters using the SUBSTITUTE function

Steps:

  • In an empty cell where you want your result to appear, put an equal (=) sign and then write SUBSTITUTE along with it.
  • Inside the brackets of the SUBSTITUTE function, write the cell reference number from which you want to remove dot (.) (in our case, the Cell number was C5).
  • Put a comma (,) symbol and write a dot (.) inside double quotes (or any old text that you want to remove).
  • Put a comma (,) and leave a blank double quote if you want a null string instead of a dot (.) (or any new string that you want your old text to replace with).

The required formula will look like the following,

=SUBSTITUTE(C5,”.”,””)
  • Press Enter.

Formula of SUBSTITUTE function to remove characters

  • Drag the row down using the Fill Handle to apply the formula to the rest of the dataset.

Final output using the SUBSTITUTE formula to remove characters


Method 3 – Extract Only a Particular Instance of a Specific Character in a String

Instead of removing all the dots (.) from the Wrestlers’ Profession of the dataset, we will delete only the first dot (.) from each cell.

Sample dataset to remove specific instances

Steps:

  • Use the following formula:
=SUBSTITUTE(C5,”.”,””,1)

Here, 1 as the fourth argument means we want to remove the 1st dot (.) from the dataset (if you want to remove the 2nd character from your dataset, write 2 instead of 1, and so on).

Formula of SUBSTITUTE to remove specific instances

  • Drag the row down using the Fill Handle to apply the formula to the rest of the dataset.

Output with removing specific instances


Method 4 – Remove Multiple Specific Characters with a Nested SUBSTITUTE Function

In the dataset below, the Professions for the names Finn and Roman consist of multiple dots (.).

Sample dataset for removing characters

Steps:

  • To establish a nested SUBSTITUTE function, you have to write a SUBSTITUTE function inside another SUBSTITUTE function and pass relevant arguments inside the brackets.

Formula of Nested SUBSTITUTE function to remove characters

  • We start with the formula,
=SUBSTITUTE(C5,”.”,””)
  • To delete another dot(.) (or any other character that you required) along with it, we put this formula inside another SUBSTITUTE formula and pass the arguments (old_text, new_text) inside it (in our case, it was “.”,””).
  • The new formula is:
=SUBSTITUTE(SUBSTITUTE(C5,".",""),".","")
  • Press Enter.
  • Drag the row down using the Fill Handle to apply the formula to the rest of the dataset.

Output removing characters using the nested SUBSTITUTE formula

Read more: How to Remove Special Characters in Excel


Method 5 – Erase Any Special Characters with the CLEAN Function

The CLEAN function removes line breaks and non-printable characters from a string:

=CLEAN(original_string)

original_string = the text or reference to the text cell that you want to clean.

In the following data table, we copy and pasted the Harry Potter Movie Series in the Excel sheet. The cells contain multiple non-printable characters (line-breaks).

Sample dataset for removing special characters

Steps:

  • Select the first cell of the column where you want the results to appear (in our example, it is Cell D5).
  • Use the formula:
    =CLEAN(B5)
  • Press Enter.

Formula of CLEAN to remove specific characters

  • Drag down the Fill Handle to apply the formula to the rest of the dataset.

Final output with CLEAN formula removing specific characters


Method 6 – Eliminate Spaces with the TRIM Function

The TRIM function removes all the leading or trailing spaces in texts and extra spaces between words, leaving just a single space.

The general syntax for this function is:

=TRIM(original_string)

original_string = the text or reference to the text cell that you want to process.

Consider the following dataset where cells contain multiple spaces.

Dataset for eliminating space characters

Steps:

  • Select the first cell of the column where you want the results to appear (in our example, it is Cell D5).
  • Insert the formula:
    =TRIM(C5)
  • Press Enter.

Formula of TRIM to remove space characters

  • Drag down the Fill Handle to apply the formula to the rest of the dataset.

Output removing space characters using the TRIM function


Keep in Mind

There are many non-printable characters in Unicode that CLEAN cannot remove. The CLEAN function only removes the first 32 (non-printable) characters in the 7-bit ASCII code (i.e., values 0 to 31). Apply the TRIM function after applying the CLEAN function to remove the spaces since the space character has a value of 32 and the CLEAN function won’t remove them.


Excel Remove Characters: Knowledge Hub

<< Go Back To Excel Remove Characters | Data Cleaning in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sanjida Ahmed
Sanjida Ahmed

Sanjida Ahmed, who graduated from Daffodil International University with a degree in Software Engineering, has worked with SOFTEKO since 2021. She has written over 100 articles on Excel & VBA and, since 2022, has worked as the Project Manager of the Excel Extension Development Project in the Software Development Department. Since starting this software development, she has established an outstanding workflow encompassing a full SDLC. She always tries to create a bridge between her skills and interests in... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo