Find & Replace – using wildcard Character (*)

This time we’ll talk about “Find and Replace” and we’ll see its importance in the context of data cleaning. In fact, I have to start with the data which is going to illustrate how is this going to be used.

For example, if I have a set of names with certain extra data with respect to their domains, their location in which they are working. For example, the first guy is Ismael Abdusalam. He is allocated to the Asia Pacific (ASIAPAC) team. And the second one belongs to Latin America team (LATAM)


Now if you just want to delete the slash in part, How do I do that quickly with a help of find and replace. I’ll choose a sample data. I’ll press Ctrl + H. Once I do that, it says to find what, I will say “/” I will say “IN”, and then I will say “/”closed. That means the same backstroke. Now replace it with what nothing.

Find and Replace Box

When I do that replace all notice amongst the chosen data all the 3 instances of /in/ goes away. Instead, we have made 3 replacements.

Find and Replace-3 instance


Find and Replace-3 replacements

Now, this was basic find and replace which you may have used in the word document also. What I want us to discuss is the use of wild card character and we’ll see how much this particular wild card character amplifies the power of find and replace. Let’s find out.

Assume that you want to eliminate everything after the first “/” including the first slash or backstroke as some people call it. Now I notice the common characters aren’t present. For example, the first one differs from the second in terms of suffix.

Select Ismael Abdusalaam

So I want to choose the data to let’s say half way through.

Select half the way

Press Ctrl + H. Now in the find what section let me put “/” forward slash, or put a star mark “/*”. Or asterisk as it called sometimes. Now once I do that and I say replace with nothing.

Press Ctrl+H

As I click on replace all, notice what is going to happen. It says all done. We made 5 replacements. And you notice slash onwards everything gone. So star or asterisk means it can pick up any number of character. The reason why we gave a slash before a star is we did not want to eliminate the full set of characters.

Replace All

Because if I say Ctrl + H, and if I simply say star *, it will replace all the data with nothing. Which is what I did not want. So I need to give an identifier through which Excel can identify from which character the data must be eliminated.

Made 4 Replacements

In fact, if I give one more example. Let’s say Ctrl + H. And I say @*, can you guess what is going to happen if I press the replace all button. Yes, @ onwards everything will be going away. So replace all. There you go. This is wild card character usage in find and replace.

Made 5 Replacements

I hope you like our blog, do share with your friend and colleague.

More related content available on our youtube channel: Yoda learning Youtube Channel

Check out our Premium E-Learning Video Courses

Download our Excel Ninja App