Remove Unwanted Characters
While working with data in Excel, you may encounter unwanted characters that need to be removed. In such cases, you can use the SUBSTITUTE function to create a formula that eliminates these undesired characters. This tutorial will guide you through the process of writing this formula.
Formula to Remove Unwanted Characters
Follow these steps to create the formula:
- Begin by entering the SUBSTITUTE function in a cell.
- Refer to the cell containing the original text.
- Specify the character you want to remove (enclose it in double quotation marks).
- Enter a blank character using double quotation marks.
- Press Enter to obtain the result.
Example Formula: =SUBSTITUTE(A1,”@”,” “)
This formula removes the “@” character from the value in cell A1 and replaces it with no character. Alternatively, you can replace it with a blank space.
Example Formula: =SUBSTITUTE(A1,”@”,””)
Using the SUBSTITUTE function is a quick way to eliminate unwanted characters from a string. If you need to remove two or more characters from a single cell, you will need to use the SUBSTITUTE function multiple times.
Example Formula: =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,”@”,””),”!”,””),”-“,””)
In the above example, there are three different characters that we want to remove from the text string. To accomplish this, we use nested SUBSTITUTE functions, removing one unwanted character with each function.