Home>Blogs>Excel Tips and Tricks>How to use Replace with Wildcard in Excel
Excel Tips and Tricks

How to use Replace with Wildcard in Excel

Ever found yourself dealing with messy data in Excel, wishing there was a magic wand to clean it up? If you’re nodding your head, you’re in for a treat! In this blog post, we’ll explore how to use Excel’s Find and to Replace with Wildcard to extract specific information from data. Whether you’re working with email addresses, names, or any other structured data, this method will save you tons of time Replace with Wildcard.

What Is the Replace Function with Wildcards in Excel?

Replace Function with Wildcard
Replace Function with Wildcard

The to Replace with Wildcard feature in Excel is a game-changer when working with patterns in text. It allows you to find specific parts of your data based on defined criteria and replace them with something else—or nothing at all.

In today’s example, we’ll take a list of email addresses copied from Microsoft Outlook and demonstrate how to extract the names and email IDs separately using this method.

The Dataset: A Quick Look

Here’s the data we’re working with:

Our goal is to separate the names and email addresses into two clean columns. Sounds tricky? It’s actually super easy with wildcards.

Step-by-Step Guide to Extract Email IDs

Extract Email IDs
Extract Email IDs

Let’s start by isolating the email addresses from the data.

Steps:

  • Select Column A
  • Highlight the column containing the data you want to clean. In our example, that’s Column A.
  • Open Find and Replace (Ctrl + H)
  • Press Ctrl + H to open the Find and Replace dialog box.
  • Enter Wildcard Criteria
  • In the Find what box, type *<.
  • The asterisk (*) acts as a wildcard, matching any text before the < symbol.
  • Click Replace All

Leave the Replace with box empty and hit the Replace All button. This removes everything before and including the < symbol, leaving only the email IDs.

Voilà! Your column now contains clean email addresses.

Step-by-Step Guide to Extract Names

Extract Names
Extract Names

Next, let’s extract the names from the data.

Steps:

  • Select Column B
  • Highlight the column containing the data. In our example, that’s Column B.
  • Open Find and Replace (Ctrl + H)
  • Again, press Ctrl + H to bring up the Find and Replace dialog box.
  • Enter Wildcard Criteria
  • In the Find what box, type <*.
  • The space before < ensures that the method captures the portion after the names.
  • Click Replace All
Click Replace All
Click Replace All

Leave the Replace with box empty and click Replace All. This removes everything from the < symbol onward, leaving only the names.

And just like that! You now have a separate column with clean names.

Why Use Wildcards in Excel?

This method is not only quick but also incredibly versatile. Here are a few reasons why you’ll love it:

  • Time-Saving: Forget manual editing—wildcards do the heavy lifting in seconds.
  • Flexible: Works on a variety of patterns, making it perfect for unstructured data.
  • Error-Free: Reduces the chances of mistakes, especially in large datasets.

Tips and Tricks for Success

Here are a few bonus tips to make the most of this feature:

  • Test First: Always try the Replace function on a copy of your data. It’s better to be safe than sorry!
  • Understand Wildcards: The * matches any text, while the ? matches single characters. Knowing these can expand your skills.
  • Undo is Your Friend: Made a mistake? Just hit Ctrl + Z to undo the last action.

Wrapping Up

Now that you’ve mastered the art of using wildcards with Find and Replace with Wildcard in Excel, you’re ready to tackle messy data with confidence. This technique is a lifesaver when dealing with repetitive tasks and structured patterns.

Visit our YouTube channel to learn step-by-step video tutorials

Youtube.com/@PKAnExcelExpert

 

Watch the step-by-step video tutorial:

Click hare to download the practice file

 

PK
Meet PK, the founder of PK-AnExcelExpert.com! With over 15 years of experience in Data Visualization, Excel Automation, and dashboard creation. PK is a Microsoft Certified Professional who has a passion for all things in Excel. PK loves to explore new and innovative ways to use Excel and is always eager to share his knowledge with others. With an eye for detail and a commitment to excellence, PK has become a go-to expert in the world of Excel. Whether you're looking to create stunning visualizations or streamline your workflow with automation, PK has the skills and expertise to help you succeed. Join the many satisfied clients who have benefited from PK's services and see how he can take your Excel skills to the next level!
https://www.pk-anexcelexpert.com