Excel Find and Replace Wildcards: A Practical Guide

How-to basics · Updated November 3, 2026

Excel Find and Replace Wildcards: A Practical Guide

Yes. In Excel for Microsoft 365 on Windows, press Ctrl+H, enter a pattern in Find what, and use * for any number of characters or ? for exactly one character; then enter the replacement and choose Replace or Replace All. For example, finding draft* can match text beginning with draft, while INV-??? matches INV- followed by exactly three characters.

Which wildcards Excel recognizes

Excel’s Find and Replace dialog recognizes three special characters in the Find what box. Their meanings are simple, but a small difference between them can change which cells are affected:

  • * matches any sequence of characters, including no characters. A search for plan* can match plan, planned, or planning.
  • ? matches exactly one character. A search for INV-??? matches INV- followed by three characters, such as INV-482, but not INV-48 or INV-4821.
  • ~ makes the next wildcard character literal. Search for ~* to find an actual asterisk, ~? to find a question mark, or ~~ to find a tilde.

The tilde is important when your data includes characters that Excel normally treats as wildcards. For instance, if product names contain an actual question mark, searching for just ? will match any single character instead of that punctuation mark. Put a tilde immediately before it to search for the literal symbol.

How to use wildcards in Find and Replace

On Windows, open the Replace tab with Ctrl+H, or select Home > Find & Select > Replace. On Excel for Mac, use Home > Find & Select > Replace; keyboard shortcuts can vary with the Mac keyboard and Excel settings, so the ribbon command is a dependable route. In the dialog, Find what holds the wildcard pattern and Replace with holds the text to put in its place.

  1. Select the cells you want to change before opening the dialog if the search should be limited to that range. If nothing is selected, Excel searches the current scope, usually the active worksheet.
  2. Type a pattern into Find what. For example, enter draft* to locate text starting with draft.
  3. Type the replacement into Replace with. To remove the matched text, leave this box empty.
  4. Choose Find Next to inspect matches one at a time, or use Replace to change a selected match. Choose Replace All only after checking the pattern and scope.

For example, if cells contain draft, draft copy, and approved, finding draft* and replacing it with Review can turn the first two matching text entries into Review. The wildcard is used to identify the text to replace; it is not copied into the replacement automatically. Excel does not provide capture groups or backreferences in this dialog, so you cannot use a replacement such as a special marker meaning insert the characters that * matched.

Useful patterns and practical examples

Wildcards are most useful when records follow a recognizable pattern but include variable text. Think about which part of the text is fixed and how much variation you want to allow. A pattern that is too broad can catch valid data along with the intended targets.

  • Find North* to match text beginning with North, such as North, North region, or Northeast. Replacing the match with a single standard label can remove the rest of each matched phrase, so inspect examples first.
  • Find *-old to locate text ending in -old, such as File-old. You could replace the match with an empty entry to remove the whole matching text from the cell.
  • Find AB?17 to match a five-character sequence whose first two characters are AB, whose fourth and fifth are 17, and whose middle character can be anything. It matches ABX17, but not AB17.
  • Find ~* to locate a literal asterisk in text such as a footnote marker. Replace it with nothing only if removing those marks is intended.

A wildcard pattern may match only part of a cell’s contents. The option Match entire cell contents changes that: with it selected, the complete cell content must fit the pattern. For example, a search for draft* can match a cell containing draft copy as a partial match; with Match entire cell contents selected, the cell must consist entirely of text that fits that pattern. This option is useful for standardizing complete labels, but can exclude matches if cells contain extra spaces or other text.

What the replacement does—and does not do

Wildcards work in Find what; they are not a general transformation language for Replace with. If the search pattern is Ref-* and the replacement is Reference, the matched portion is replaced by Reference. Excel does not preserve the variable suffix for you, so a value such as Ref-204 may become Reference rather than Reference-204.

To retain variable text while changing only a fixed prefix or suffix, a formula or a more controlled data-cleaning method may be more suitable than wildcard replacement. Make a copy of the data first, then check several representative results. Be especially cautious with Replace All in a column containing mixed labels, identifiers, or notes: a pattern can match a longer span than you intended.

Find and Replace also does not interpret these patterns as regular expressions. It has no character ranges such as [A-Z], repetition counts, or regex groups. A question mark means one character, not an optional character, and an asterisk means any sequence, not a literal star. Use tilde when the literal wildcard symbol itself is the target.

Control the search scope and options

Use the expanded Find and Replace options to decide where and how Excel searches. Available choices can depend on the workbook and Excel version, but common controls include the current sheet or workbook, searching by rows or columns, the content to look in, and matching case or entire cell contents.

  • Set Within to Workbook when the target may be on multiple sheets; otherwise keep the search on the current sheet to reduce accidental changes.
  • Use Look in to choose what Excel searches, such as formulas or displayed values. A formula search can find text inside formula expressions, which is different from searching the value a formula displays.
  • Turn on Match case when capitalization matters. Excel searches are otherwise generally not case-sensitive, so North and north may be treated alike.
  • Use Match entire cell contents when the whole cell must fit the pattern rather than merely containing a matching portion.
  • If formatting criteria have been applied in the dialog, clear them when they are no longer needed. A hidden format criterion can make an otherwise correct search appear to miss data.

Searching formulas deserves particular care. If Look in is set to formulas, a replacement can alter formula text rather than merely change what a cell displays. Avoid Replace All across a workbook unless you understand which cells and content types are included. For values that are numbers, dates, or formula results, wildcard behavior may not match your expectation because the underlying content is not ordinary text. Check a single result before proceeding.

Common problems and how to avoid them

If Excel reports no matches, first check for a mistaken wildcard or an overly restrictive pattern. A pattern with three question marks requires three characters in that position; it will not match a two-character code. If you meant a literal asterisk or question mark, add a tilde before it. Also check whether Match entire cell contents is enabled, whether the selected range excludes the data, and whether the search is set to the intended sheet or workbook.

If Replace All changes too much, undo immediately with Ctrl+Z on Windows or Command+Z on Mac, provided you have not performed another action that prevents the undo. Then narrow the selection, add more fixed text to the pattern, or use Find Next and Replace to review matches individually. Saving a copy before a large cleanup is a sensible safeguard, particularly when the workbook contains formulas or data spread across multiple sheets.

Formatting can also affect results. Find and Replace can use formatting criteria as well as text criteria. If a search unexpectedly finds only some cells, open the dialog’s options and inspect any formatting displayed beside Find what or Replace with. Clear the formatting criteria if you meant to search by text alone. Remember that displayed text can differ from the underlying cell value: a date or number may look like a text pattern without actually being stored as text.

When a formula or another method is better

Find and Replace is convenient for a one-time, direct edit. It is less suitable when you need to preserve changing parts of text, apply detailed rules, or create a repeatable cleanup process. A formula can return a cleaned version in another column so you can review the output before replacing the original data. Power Query is another option for repeatable transformations involving imported or structured data. The best choice depends on whether you need a quick edit, a reviewable result, or a process you can refresh later.

Do not confuse the dialog’s wildcards with Excel’s FIND function. FIND locates text with case sensitivity and does not use * and ? as wildcard characters. SEARCH is a separate worksheet function and does support wildcard characters in its search text, with tilde used to escape them. Both functions return a character position rather than changing cell contents. For bulk edits, the Find and Replace dialog is usually the direct tool; for calculations or reusable logic, choose a function or data transformation designed for that job.

Frequently Asked Questions

Can Excel Find and Replace use * and ?
Yes. In Find what, * matches any sequence of characters and ? matches one character. Use ~ before either symbol when you want to search for it literally.

How do I replace everything after a word?
Use the fixed word followed by an asterisk in Find what, such as Code*, but note that Excel replaces the entire matched portion with the replacement text. It does not keep the variable ending automatically. Test the pattern on a copy or use a formula if that ending must be preserved.

Can I use wildcards to find a literal asterisk?
Yes. Enter ~* in Find what. The tilde tells Excel to treat the following asterisk as a character rather than as a wildcard.

Does Match entire cell contents work with wildcards?
Yes. It requires the complete cell content to match the pattern. For example, INV-??? can match a whole cell containing INV- followed by exactly three characters, but not a cell with extra text before or after it.

Can I use regular expressions in Excel Find and Replace?
No. The dialog uses the simpler * and ? wildcard rules, with ~ for escaping. It does not support regular-expression features such as character classes, groups, or repetition counts.

Why does Excel find no matches when the text looks right?
Check the selected range, sheet or workbook scope, Look in setting, Match case, and Match entire cell contents. Also check for leading or trailing spaces, literal wildcard symbols that need a tilde, and formatting criteria left over from an earlier search.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.