Arrow left
Back to guides
Excel Tips

Wildcards in Excel: Explained

In this article, you will learn how to use Wildcards in Excel

What are Wildcards in Excel?

In Excel, wildcards are special characters that are combined with other characters in search criteria to perform partial matches or pattern-based searches in cells containing text. Wildcards are particularly useful when you want to search for specific patterns or variations of a particular word or phrase.

There are two main types of wildcards in Excel:

Asterisk (*) Wildcard:

The asterisk wildcard represents any number of characters (including zero characters) in a search term. It can be used to match any sequence of characters in a cell.

Example: Searching for "appl*" would match "apple", "application", "appliance", and so on.

Question Mark (?) Wildcard:

The question mark wildcard represents a single character in a search term. It can be used to match any single character in a cell.

Example: Searching for "te?t" would match "test", "text" and so on.

What are some uses of Wildcards in Excel?

Wildcards in Excel offer powerful functionality for performing flexible and dynamic searches, filtering, and data manipulation. Here are some common uses of wildcards in Excel:

  1. Filtering and Searching: Use wildcards to filter and search for specific patterns within text values or strings. For example, you can use wildcards to filter and retrieve data that starts with a specific letter or contains a particular sequence of characters.
  2. Data Validation:Employ wildcards to set up data validation rules for cells or ranges. For instance, you can use a wildcard pattern to validate inputs that follow a specific format or structure.
  3. Formulas and Functions: Utilize wildcards within formulas and functions to perform dynamic calculations and manipulations. Wildcards can be used in functions like COUNTIF, SUMIF, and VLOOKUP to match specific patterns or conditions.
  4. Text Manipulation: Apply wildcards when manipulating text data to perform tasks such as extracting substrings, replacing characters, or formatting. Wildcards can be useful in functions like LEFT, RIGHT, MID, and SUBSTITUTE.

These are just a few examples of the diverse applications of wildcards in Excel. Wildcards provide flexibility and efficiency in handling and manipulating data, enabling users to perform complex tasks with ease.

Filtering Account Codes and summarizing Account Balances:

Suppose you have a list of account codes and their corresponding account balances in columns A & B in Excel. Every region account codes start with a specific region code followed by the account number. Your objective is to summarize the balances by specific account types or regions. You can use wildcards with SUMIF to do the same by using the formula shown below the sum function adds up all the account balances where the Account codes start with AP. Please note because we use the “*” wildcard using just one “*” allows us to match all account codes having starting with AP irrespective of the number of digits following AP.

=SUMIF( A:A, "AP*",B:B)

Similarly we can also use the “?” wildcard for filtering the account codes as well. As seen in the formula below, when using the “?” wildcard we need to mention it for as many characters expected in the search string. 

=SUMIF( A:A, "AM????",B:B)

If the “?” is used a single time like below, the search doesnot yield any results as all EMEA account codes have EM followed by four characters and our formula is only searching for EM followed by a single character. 

=SUMIF( A:A, "EM?",B:B)
Using Wildcards to filter and summarize data in Excel

Learn how to do this step-by-step in the video below 👇

Automate financial reporting with LiveFlow

Want to eliminate manual updates of your Excel & Google Sheets models?

Yes, show me how

Need help?

Our team is here to help you any time between 9am and 10pm EST.
Check Icon
Email us at:

Liked this article? Then you'll love the ones below