How to Find and Replace the Asterisk (*) Character in Excel – 4 Methods

The dataset below showcases employees’ details with an ‘*’ in column B.

To replace the ‘*’ with ‘,’ in column C:

Excel Find and Replace * Character


Method 1 – Use the Find and Replace Feature to replace the Asterisk (*) 

STEPS:

  • Go to the Home tab.
  • Click Find & Select in Editing.
  • Click Find.

  • In the Find and Replace dialog box, enter “*” in Find what:.

  • In Replace with:, enter ‘,’ and click Replace All.

Excel Find and Replace * Character

This is the output.

Excel Find and Replace * Character

  • To replace the asterisk (*) sign only, enter ‘~’ before the asterisk (*).
  • Click Replace All.

The text will be visible, and the ‘*’ is replaced with ‘~’.


Method 2 – Using the Excel FIND and REPLACE Functions to Find and Replace the ‘*’ 

To shorten the names in column C, taking the first letter of the name and replacing ‘*’ with (.):

STEPS:

  • Select C5 and enter the formula:
=REPLACE(B5,1,FIND("*",B5),LEFT(B5)&".")
  • Press Enter.

The REPLACE function uses the cell reference B5, counts the letters until it finds ‘*’, using the FIND function. The LEFT function replaces the first name with its starting letter and a dot (.).

  • Drag down the Fill Handle to see the result in the rest of the cells.

Excel FIND and REPLACE Functions to Find and Replace ‘* Character

This is the output.

Read More: How to Find and Replace Using Formula in Excel


Method 3 – Applying the  SUBSTITUTE Function to Find and Replace

STEPS:

  • Select C5 and enter the formula:
=SUBSTITUTE(B5,"*",",")
  • Press Enter.

  • Drag down the Fill Handle to see the result in the rest of the cells.

Apply SUBSTITUTE Function to Find * Character and Replace

  • This is the output.

4 Ways to Find and Replace Asterisk (*) Character in Excel


Method 4 – Find and Replace the Asterisk (*) with VBA in Excel

To replace ‘*’ with a space and see the result in a MsgBox:

STEPS:

  • Go to the Developer tab.
  • Click Visual Basic or press Alt + 11 to open the Visual Basic Editor.

  • You can also open the Visual Basic Editor by right-clicking the sheet and selecting View Code.

  • Enter the code in the Visual Basic Editor:

VBA Code:

Sub Find_and_Replace()
string1 = "Jhon*Barker, Alex*Jane, Robert*Chao, Sally*Brooke"
string1 = Replace(string1, "*", " ")
MsgBox string1
End Sub
  • Run the code by pressing F5 or clicking Run Sub button.

This is the output.


Download Practice Workbook

Download the workbook and practice.


Related Articles


<< Go Back to Find and Replace | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sabrina Ayon
Sabrina Ayon

Sabrina Ayon, a Computer Science and Engineering graduate from United International University, has been an integral part of the ExcelDemy project for two years. She authored 150+ articles, excelling in instructing through visually engaging Excel tutorials. With a passion for teaching, Sabrina conducted sessions on Excel VBA, sharing her knowledge and insights with others. Currently holding the position of Project Manager for the ExcelDemy Visual Development Project, she oversees various aspects of the project, ensuring its smooth operation... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo