How do you remove asterisks from text in excel?

I am working with a table that has asterisks within a cell used as text within a specific range and they need to be removed.

What would the VBA code be to accomplish this within an existing macro?
Who is Participating?
Rory ArchibaldConnect With a Mentor Commented:
You can also use the range.replace method:
ActiveSheet.UsedRange.Replace "~*", ""

Open in new window

rather than looping.
Harry LeeConnect With a Mentor Commented:
I don't think you need to use VBA.

Select the range of cells you want to remove the * from,

Use Replace feature of Excel, in Find What, type in ~*, and in the Replace With, type in whatever you want to replace it with. A space maybe what you want.

The ~ will instruct Excel to search for * instead of treating the * as wildcard character.
bearblackAuthor Commented:
I do need to put this into the macro need to work with the data afterward.
Martin LissOlder than dirtCommented:
Here's a macro that you can use. It looks at all the cells in the active sheet but you can narrow that down if you like.

Sub RemoveAsterisk()
Dim c As Range

For Each c In ActiveSheet.UsedRange.Cells
    c = Replace(c.Value, "*", "")
End Sub

Open in new window

bearblackAuthor Commented:
Thanks to both of you for your help!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.