Pinterest Pixel

The Ultimate Guide to Wildcard in Excel – Step by Step Formula Shortcuts

John Michaloudis
In Microsoft Excel, a wildcard is a great tool used in searches, filtering, and data manipulation tasks.
They allow users to represent one or more characters when searching for specific patterns within text or data.

In this article, you will learn how to use a wildcard in Excel.

In Microsoft Excel, a wildcard is a great tool used in searches, filtering, and data manipulation tasks. They allow users to represent one or more characters when searching for specific patterns within text or data. In this article, you will learn how to use a wildcard in Excel.

Key Takeaways:

  • Wildcards help you search and match text without knowing the exact value.
  • Excel supports three wildcard characters: *, ?, and ~.
  • You can use wildcards with functions like COUNTIF, SUMIFS, and XLOOKUP.
  • Wildcards also work with Find and Replace and Filters.
  • Check for extra spaces and use the correct wildcard if your formula does not return the expected result.

 

Introduction to Wildcard

What is a Wildcard?

A wildcard in Excel is a special character that represents one or more characters in a text string. Wildcards make it easier to search, filter, count, or match data when you do not know the exact text or when only part of the text is available.

Wildcards are commonly used with functions such as XLOOKUP, VLOOKUP, COUNTIF, COUNTIFS, SUMIF, SUMIFS, SEARCH, and FILTER to perform flexible text matching. They are especially useful when working with large datasets that contain similar names, codes, or descriptions.

Types of Wildcards

The three primary wildcards used in Excel:

  • Asterisk (*) – It is used to match any number of characters.
  • Question mark (?) – It is used to match exactly one character.
  • Tilde (~) – It treats *, ?, or ~ as regular characters instead of wildcards.

 

How to use Wildcards in Excel

Find and Replace

Find and Replace feature allows you to search for specific text and replace it. Wildcards allow you to search for a text pattern, and it is useful when some characters are unknown.

You can use the * sign before 2023 to search for all sentences that end with 2023.

wildcard in excel

Functions

Excel functions such as COUNTIF, SUMIF and AVERAGEIF support wildcards. You can use these characters to perform calculations based on specific criteria. These functions can be used to count, sum or average values based on partial searches instead of exact match.

wildcard in excel

This formula sums values in column B where the corresponding cell in column A ends with “2023”.

Filters

Excel’s filtering options allow you to display only the data that meets specific criteria. Wildcards in filters enable you to precisely filter data based on patterns rather than exact matches.

wildcard in excel

Filters rows that end with “2023”.

 

Solving Common Wildcard Puzzles

  • Check your data for extra spaces that may prevent a match.
  • Remove hidden or non-printable characters if the results are incorrect.
  • Make sure the Excel function you are using supports wildcards.
  • Combine wildcards with the & operator to create flexible search criteria.
  • Test your formula with a simple example to confirm it works correctly.
  • Use functions like COUNTIFS or SUMIFS to verify that your wildcard criteria return the expected results.
  • Review your spelling and data format if the formula does not return the expected output.

 

FAQs

Why do we use wildcards in Excel?

We use wildcards in Excel to search, filter, and manipulate data with flexible criteria. They are used for partial matches or when the complete data entry isn’t known. It is great for tasks like finding a string within a larger text or creating dynamic formulas that adjust to varying content.

How to use Wildcard Characters in Excel Formulas?

In Excel formulas, you can use wildcards for searching and filtering unknown characters. To count instances that end with example followed by any number of characters:

=COUNTIF(A1:A10, "*example?")

Why Aren’t My Excel Wildcards Working Correctly?

If Excel wildcards aren’t working, ensure you’re using the correct one (*, ?, ~) for the task. Check that they are not misinterpreted as literal characters—use a tilde (~) before a wildcard if so. Also, confirm the function you’re using supports wildcards, and look out for any hidden errors in your formulas.

What is an example of a wildcard search?

An example of a wildcard search in Excel is using =SEARCH("a?to*e", A1) to find any occurrences in cell A1 that start with ‘a’, followed by any character, then ‘to’, followed by any number of characters, ending with ‘e’, like ‘autozone’ or ‘agitate’.

What is the wildcard match formula in Excel?

The wildcard match formula in Excel often involves the MATCH function with wildcards, like =MATCH("*criteria*", range, 0). This will return the position of the first cell in the range that contains the word ‘criteria’ anywhere in the cell. Use “*” for any sequence of characters, and “?” for a single character.

If you like this Excel tip, please share it


Founder & Chief Inspirational Officer

at

John Michaloudis is a former accountant and finance analyst at General Electric, a Microsoft MVP since 2020, an Amazon #1 bestselling author of 4 Microsoft Excel books and teacher of Microsoft Excel & Office over at his flagship MyExcelOnline Academy Online Course.

See also  How to Unprotect an Excel Spreadsheet Fast

Steps To Follow

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...