How to Remove Specific Text from Cells in Excel
Removing specific text from cells in Excel can be done using various methods such as Find & Replace, using a formula, or by using Text to Columns. In this guide, we will discuss these methods.
Method 1: Using Find & Replace
- Select the cells or range of cells where you want to remove specific text.
- Press
Ctrl + H
to open the Find & Replace dialog box. - In the "Find what" field, enter the specific text you want to remove.
- Leave the "Replace with" field empty.
- Click on "Replace All" to remove the specific text from the selected cells.
- Click "Close" to close the Find & Replace dialog box.
Method 2: Using a Formula
- In a blank cell, use the SUBSTITUTE function to replace the specific text with an empty string. For example, if you want to remove the text "apple" from cell A1, enter the formula:
=SUBSTITUTE(A1, "apple", "")
- Press
Enter
to apply the formula. - Drag the fill handle down or across to apply the formula to other cells.
- If you want to replace the original data, copy the cells with the formula, and then right-click on the original data range and choose "Paste Values."
Method 3: Using Text to Columns
This method is useful when the specific text is a delimiter separating values in a cell.
- Select the cells or range of cells where you want to remove specific text.
- Click on the "Data" tab, and then click "Text to Columns."
- Choose "Delimited" and click "Next."
- In the "Delimiters" section, select "Other" and enter the specific text you want to remove in the box next to it.
- Click "Next."
- Choose the format for the resulting data, and then click "Finish."
Example: Removing Specific Text from Cells
Let's say we have a list of product codes, and we want to remove the text "ABC" from them.
ABC123
DEF456
ABC789
GHI012
Using Find & Replace
- Select the range of cells containing the product codes (A1:A4 in this case).
- Press
Ctrl + H
to open the Find & Replace dialog box. - In the "Find what" field, enter "ABC".
- Leave the "Replace with" field empty.
- Click on "Replace All."
- The specific text "ABC" will be removed from the selected cells.
Using a Formula
- In cell B1, enter the formula:
=SUBSTITUTE(A1, "ABC", "")
- Press
Enter
to apply the formula. - Drag the fill handle down to apply the formula to cells B2, B3, and B4.
- The specific text "ABC" will be removed from the product codes in column B.
Using Text to Columns
Assuming the specific text is a delimiter (e.g., "ABC-123"), follow these steps:
- Select the range of cells containing the product codes (A1:A4 in this case).
- Click on the "Data" tab, and then click "Text to Columns."
- Choose "Delimited" and click "Next."
- In the "Delimiters" section, select "Other" and enter the specific text you want to remove (e.g., "-") in the box next to it.
- Click "Next."
- Choose the format for the resulting data, and then click "Finish."
- The specific text (delimiter) will be removed from the selected cells, and the separated values will be placed in separate columns.
Did you find this useful?