To find a literal asterisk in Excel, press Ctrl+H, enter ~* in Find what, and choose Find All or Replace All. The tilde tells Excel to treat the asterisk as a character to search for, rather than as a wildcard that can match any amount of text.
Why an asterisk needs special treatment
In Excel’s Find and Replace tool, the asterisk has a special meaning: it is a wildcard. A search for * can match text of any length, including an empty string, rather than locating only cells that contain a printed asterisk. This is useful when you want to locate a broad pattern, but surprising when the symbol itself is what you need.
Excel uses the tilde as an escape character for wildcard searches. Put a tilde immediately before an asterisk to search for the literal symbol: ~*. The tilde is an instruction for the search, not a character you are asking Excel to find. The same principle applies to the question mark wildcard, which matches one character: search for ~? to find a literal question mark. To find a literal tilde, double it as ~~.
This distinction matters in data such as product codes, filenames, email addresses, notes, or imported text. A cell containing AB*12 has an actual asterisk between the letters and digits. A wildcard search for AB*12, by contrast, can match text beginning with AB and ending with 12, with any intervening characters.
Find a literal asterisk step by step
In Excel for Microsoft 365 on Windows, use these steps to locate asterisks in the current worksheet:
- Press Ctrl+H to open Find and Replace. You can also choose Home > Find & Select > Replace.
- In the Find what box, type
~*. - Leave Replace with empty if you only want to locate matches. Choose Find Next to move through results, or Find All to list the matching cells.
- If you want to change the cells, type the replacement text in Replace with. Choose Replace to change one match at a time, or Replace All to change every matching instance in the chosen search scope.
- Review Excel’s completion message, then inspect the affected cells. If you changed more than intended, use Ctrl+Z immediately to undo the operation.
For example, if a cell contains Item*42, searching for ~* finds the asterisk in that text. Replacing it with a hyphen changes the cell to Item-42. If Replace with is empty, the asterisk is removed, leaving Item42.
The dialog may retain settings from an earlier search. Before replacing, check the search scope and options rather than assuming Excel has reset them. Excel for Mac has the same tilde escape rule; you can open Find and Replace from the Edit menu, then use its Find and Replace controls. Ribbon labels and shortcuts can differ by platform and keyboard setup.
Choose the right search scope and options
A correct search pattern can still produce unexpected results if the dialog is searching the wrong place or type of content. Open the expanded options in Find and Replace and check the settings that apply to your task:
- Within: Choose Sheet to search the active worksheet or Workbook to search across worksheets in the workbook. A search limited to one sheet will not find matches on other tabs.
- Search: Choose whether Excel searches by rows or columns. This affects the order in which Find Next visits matches, not which cells qualify.
- Look in: Select Formulas or Values as appropriate. Formulas searches formula text; Values searches displayed cell results. If a cell contains a formula, the two choices can expose different text to the search.
- Match case: This controls letter case in text searches. It does not change the meaning of the asterisk escape.
- Match entire cell contents: When selected, the search must match the whole cell rather than a portion of its contents. Use it only if the cell is expected to consist of the asterisk alone.
A selection can also affect what Excel searches. If you select a range before opening Find and Replace, Excel may search only within that selection. To search an entire worksheet, click a single cell before searching, then confirm the Within setting. This is especially important before Replace All, because a limited or broader scope changes which cells are altered.
Find all, replace one, or replace all
Use Find All when you want to see where literal asterisks occur before making changes. Excel displays a list of matching cells in the search results; selecting a result can take you to that location. This is safer for unfamiliar workbooks than immediately using Replace All, because it lets you confirm whether the matches are expected.
Replace changes the current match and lets you review the next one. Replace All applies the same replacement to every match in scope. The replacement text is entered as ordinary replacement content: the asterisk in Replace with is not a wildcard instruction. For example, with ~* in Find what and * in Replace with, Excel replaces each found literal asterisk with an asterisk, so the visible text does not change. A different replacement, such as a hyphen, makes the change visible.
When a cell contains several asterisks, the search can identify occurrences within the text, and Replace All can replace each occurrence that matches. If the goal is to change only the first asterisk in each cell, do not assume Replace All has that meaning. Review results and consider a formula-based approach or a more carefully controlled manual edit if the position matters.
Common problems and how to fix them
- The search finds too much: Check that Find what contains
~*, not just*. A bare asterisk is a wildcard search. - The search finds nothing: Confirm that the data is in the selected worksheet or range, that Within is set correctly, and that Look in is appropriate. A formula cell may display an asterisk in its result even though the formula text does not contain one.
- Excel searches a whole cell instead of part of it: Clear Match entire cell contents if the asterisk appears within a longer value such as
AB*12. - Replace All changes cells you did not expect: Stop and use Ctrl+Z before making other edits. Reopen the dialog, confirm the scope and options, and use Find All to inspect matches before trying again.
- The tilde appears to be missing: That is expected when the escape works. In
~*, the tilde instructs Excel how to interpret the asterisk; the search target is the asterisk alone.
If the workbook is important, save a copy before a large replacement. Undo is useful for an immediate correction, but it is not a substitute for a backup if you continue editing or close the file before noticing a problem.
Use a formula when you want to preserve the original
Find and Replace edits source cells directly. A formula is a better option when you want to keep the original data and produce a cleaned version in another column. The SUBSTITUTE function treats the specified old text as literal text, so an asterisk in its second argument does not need the tilde escape used by Find and Replace.
With the original text in A2 and the cleaned result going in B2, enter =SUBSTITUTE(A2,"*","-") in B2. If A2 contains SKU*204*, the formula returns SKU-204-. Fill the formula down to process more rows. To remove the asterisks instead, use =SUBSTITUTE(A2,"*",""); the same example returns SKU204.
SUBSTITUTE replaces every occurrence of the specified text by default. It also has an optional instance number if you need to replace only a particular occurrence. Once you are satisfied with the results, you can copy the formula results and use Paste Special > Values to store the cleaned text without formulas. Keep the original column until you have checked the output.
Wildcard searches versus literal searches
Wildcards are useful when you want a pattern rather than a symbol. In Excel’s Find and Replace search field, an asterisk can stand for any sequence of characters, and a question mark can stand for a single character. A tilde changes those wildcard symbols into literal characters. The distinction is confined to how the search pattern is interpreted; it does not mean that every asterisk typed elsewhere in the workbook has special behavior.
For instance, if you want to find entries that start with North and end with Depot, a wildcard pattern such as North*Depot can match text between those parts. If you want a cell that literally contains the text North*Depot, search for North~*Depot. Add other escaped wildcard characters when they are meant literally. This makes the search intent explicit and avoids confusing an actual symbol with a pattern.
Remember that Find and Replace is not a regular-expression search. The asterisk does not mean “repeat the previous character,” as it does in some regular-expression systems. Excel’s wildcard behavior is simpler: an unescaped asterisk matches a sequence of characters, while ~* searches for the star character itself.
Frequently Asked Questions
How do I replace an asterisk in Excel without matching everything?
Open Find and Replace, enter ~* in Find what, enter the replacement in Replace with, and choose Replace or Replace All. The tilde makes the search target a literal asterisk instead of a wildcard.
Can I find an asterisk without replacing it?
Yes. Enter ~* in Find what and use Find Next or Find All. Leave Replace with unused; finding a match does not change the cell.
How do I find a question mark or tilde literally?
Use ~? to search for a literal question mark and ~~ to search for a literal tilde. Excel uses the tilde to escape wildcard characters in the Find what pattern.
Does the asterisk in Replace with need a tilde?
No. Wildcard interpretation applies to the Find what search pattern. If you enter * in Replace with, Excel inserts an asterisk as replacement text.
Why does Ctrl+H find no asterisks even though I can see them?
Check that Find what is ~*, that the active search scope includes the cells, and that the Look in choice matches the content you want to search. For formula cells, searching Values and searching Formulas can produce different results.
Related
- Excel Automatic Goal Seek: Options for Repeated Models
- Excel Auto Merge Cells With the Same Value? Here’s How
- Excel Add Values to a Dropdown List: Easy Methods
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Group Rows in Excel by the Same NameTo group rows that share a name, first sort the entire data range by the Name column so…
- Add a Line Below a Header in Word: Borders and ShapesTo add a line below text in a Word page header, open the header, click in its text…
- Google Sheets Date Format: Set DD MM YYYY CorrectlyTo display dates as day, month, and four-digit year in Google Sheets, select the cells and choose Format…
- How to Add a Header in Word: Step-by-Step InstructionsTo add a header in Microsoft Word, open the document, choose Insert > Header, select a layout, and…
- Protect Sheet vs. Protect Workbook in Excel: Key DifferencesIn Excel, Protect Sheet limits what people can change on one worksheet, while Protect Workbook (in the Review…
- Outlook Share Calendar Button Does Nothing? Fixes That WorkIf Outlook’s Share Calendar button does nothing, first check whether a sharing window opened behind Outlook, then try…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.