XL: Finding/Replacing Tildes and Wildcard CharactersLast reviewed: February 2, 1998Article ID: Q63807 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, when you use Find or Replace to replace or search for a tilde (~), an asterisk (*), or a question mark (?), the character must be preceded with a tilde (~).
MORE INFORMATIONThe tilde is used as a marker to denote that the next character is a literal. Microsoft Excel reads the character following a single tilde as the character to be found or replaced. If you want to find or replace a tilde in your worksheet, you must enter a double tilde (~~). Similarly, when you want to find or replace a wildcard character (* or ?), the wildcard character must be preceded with a tilde.
Example 1Suppose that you enter 494** in cell A1 and that you want to replace each asterisk with the number 2. To do this, use the following appropriate method.
In Excel 5.0 or LaterTo replace the asterisk, follow these steps:
In Excel 4.0 or earlierTo replace the asterisk, follow these steps:
If there are other cells in the worksheet that contain asterisks, note that clicking Replace All will make the change throughout the worksheet. Clicking the Replace button will change only the currently active cell and will leave the Replace dialog box open. Entering an asterisk without a tilde would replace all entries with a 2 because Microsoft Excel treats the asterisk as a wildcard. Therefore, 494** would become 2.
Example 2To replace the text of "Micros~1.xls" in any cell with "Microsoft.xls", use the following appropriate method.
In Excel 5.0 or LaterTo replace the text, follow these steps:
In Excel 4.0 or EarlierTo replace the text, follow these steps:
Microsoft Windows 95 enables you to use long file names. Therefore, when referencing an alias to a long file name, it may be necessary to change the tilde character within that alias across multiple cells in a worksheet. An alias is an abbreviated long file name that conforms to the MS-DOS 8.3 file naming convention. NOTE: These methods do not apply to Microsoft Excel versions earlier than 2.x. These versions do not provide a method for locating wildcard characters as literal characters. Entering only a wildcard character in the Find or Replace command will find or replace every character in the document.
REFERENCES"Microsoft Excel User's Guide 1," version 4.0, pages 202, 319 "Microsoft Excel User's Guide," version 3.0 for Windows, pages 169-170 "Microsoft Excel User's Guide," version 3.0 for the Macintosh, pages 163-164 "Microsoft Excel Reference," for the Macintosh, version 2.2, pages 353-354
|
Additional query words: 2.2 2.20 3.0 3.00 4.0 4.00 5.00 7.00 8.00 97
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |