Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Searching for Wildcards.

Searching for Wildcards

by Allen Wyatt
(last updated July 27, 2013)

4

You know that you can use Excel's Find and Replace feature to locate information in your workbooks. (Just press Ctrl+F or Ctrl+H to pull up the dialog box.) You may even know that you can use question marks (?) and asterisks (*) as wildcard characters, just as you would at a DOS command prompt. What if you want to search for a cell that actually contains an asterisk or a question mark, however?

Excel allows you to search for special characters by preceding the character with the tilde (~). In other words, if you want to search for an asterisk, you would actually search for ~*. If you wanted to search for the question mark, you would search for ~? instead.

Finally, if you wanted to search for the tilde character, you would actually search for ~~. In each instance, the leading tilde informs Excel that the following character should be translated as an actual character, and not as a special wildcard character.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2333) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Searching for Wildcards.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Quickly Adjusting Paragraph Spacing

Need to easily adjust the vertical spacing that follows a paragraph? You can do it using dialog boxes or you can create your ...

Discover More

Formatting Differences between Word Versions

Create a document in one version of Word on one machine and then open that document in a different version of Word on a ...

Discover More

Formatting Lots of Tables

Do you need a quick way to format your tables? Believe it or not, there are several tools you can use from Word's arsenal to ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (menu)

Changing Default Search Settings

Excel provides some great tools for finding information in a worksheet or a workbook. Changing the default settings used for ...

Discover More

Searching by Columns, by Default

Do you often want to search through a worksheet by column rather than by row? Excel defaults to searching by row, of course, ...

Discover More

Using Find and Replace to Pre-Pend Characters

Need to add some characters to the beginning of the contents in a range of cells? It's not as easy as you might hope, but ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is five more than 2?

2015-10-15 13:45:48

Adalberto

YongBoo,

You can try a macro for search and replace (or remove) any cell containning chars with ascii value greater than, for example, 167.

Public Function cuttrash(r As Range)
lr = Len(r.Value)
For c = 1 To lr
at = Asc(Mid$(r.Value, c, 1))
If at > 165 Then
cuttrash = ""
Exit Function
End If
Next
cuttrash = r.Value
End Function


2014-11-24 12:47:30

Jiehan

In response to yongboo:

Find ~*, and replace with nothing.


2014-08-16 09:22:29

PhilP

@ yongboo

Ctrl-H to Find & Replace.

In Find What box enter ~*???? (with ? for each character after * you wish to remove - if you put more than you need then no problem)

Leave Replace With box empty

Hit Replace ALL


2014-08-15 14:16:12

yongboo

I'm a teacher working on some language data on Excel. I'm trying to remove every occurrence of texts followed by '*'. For example, I have multiple cells that are like this.

출연하다
*나오다

So I'm trying to get rid of '*나오다' from this particular cell, and other cells that have a similar combination. But the actual texts after '*' are different from cell to cell.

How do I do that?
Thank you so very much for any help!!


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.