Loading
Excel.Tips.Net ExcelTips (Menu Interface)

Searching for Wildcards

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.

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.

Related Tips:

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

 

Leave your own comment:

*Name:
Email:
  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*Text:
*What is 5+3 (To prevent automated submissions and spam.)
 
 
           Commenting Terms

Comments for this tip:

Adalberto    15 Oct 2015, 13:45
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
Jiehan    24 Nov 2014, 12:47
In response to yongboo:

Find ~*, and replace with nothing.
PhilP    16 Aug 2014, 09:22
@ 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
yongboo    15 Aug 2014, 14:16
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!!
 
 

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us

 

Advertise with Us

Our Privacy Policy

Our Sites

Tips.Net

Beauty and Style

Cars

Cleaning

Cooking

DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)

Gardening

Health

Home Improvement

Money and Finances

Organizing

Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives

 

Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2016 Sharon Parq Associates, Inc.