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

Changing Print Dialog Box Defaults

Some of the built-in defaults in Word can't be changed. Often times, however, you can work around these defaults by using ...

Discover More

Using Multiple Tables of Contents

Adding multiple tables of contents is a must for some types of document design. Here's a great overview of how you can add ...

Discover More

Adding Stock Information

Adding stock information to a spreadsheet is a common need. Rather than enter information manually, why not let Sheets handle ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (menu)

Superscripts in Find and Replace

The find and replace used in Excel is less powerful than its counterpart in Word, so it is not able to do some of the ...

Discover More

Searching for Line Breaks

If you need to find where line breaks are located in cells, there are a couple of ways you can proceed. Here's a quick ...

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. 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 less than 5?

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.