Microsoft KB Archive/321819

= How to Find and Replace tildes and wildcard characters in Excel for Mac =

Article ID: 321819

Article Last Modified on 2/1/2007

-

APPLIES TO


 * Microsoft Excel X for Mac
 * Microsoft Excel 2001 for Mac
 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q321819



For a Microsoft Excel for Windows version of this article, see 214138.



SUMMARY
Microsoft Excel for Mac uses the tilde (~) as a marker to indicate that the next character is a literal. When you click Find or Replace on the Edit menu to replace or search for a tilde (~), an asterisk (*), or a question mark (?), you must precede the character with a tilde (~).

NOTE: If you want to find or replace a tilde in your worksheet, you must type a double tilde.



Example 1: How to Find and Replace Numbers
To replace wildcard characters (*) in a numeric value in a worksheet cell, use the steps in the following example:
 * 1) Type 494** in cell A1.
 * 2) Select cell A1.
 * 3) On the Edit menu, click Replace.
 * 4) In the Find what box, type ~* (press TILDE, and then press ASTERISK).
 * 5) In the Replace with box, type 2.
 * 6) Click Replace.

Cell A1 now reads 49422.

NOTES:
 * When you click Replace All, Excel for Mac makes the change throughout the worksheet. When you click Replace, Excel for Mac changes only the currently active cell and leaves the Replace dialog box open.


 * When you type an asterisk without a tilde in the Find what box, Excel for Mac replaces all entries with a 2. Excel for Mac treats the asterisk as a wildcard character. Therefore, 494** becomes 2.

Example 2: How to Find and Replace a Tilde
To replace a tilde in an Excel for Mac worksheet cell, use the steps in the following example:  Type Micros~ in cell A1. Select cell A1. On the Edit menu, click Replace. In the Find what box, type:

 In the Replace with box, type:

oft

 Click Replace All.</li></ol>

Cell A1 now reads Microsoft.

<div class="references_section">