How to Use and Search for the Tilde Character in Excel
Question details
The user needs to find, replace, or match a literal tilde (~) character in Excel formulas and search functions without triggering wildcard behaviors.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Searching for a literal tilde in a dataset or using lookup formulas where the reference data contains a tilde.
- Observed behavior
- Excel treats the single tilde as an escape character for wildcards, leading to failed searches or lookup errors when trying to match a literal tilde.
Verify whether the tilde in your data is used as a standard text character or if you are specifically trying to locate wildcard characters like asterisks (*) or question marks (?).
Search and Replace a Literal Tilde
Use a double tilde in the Find and Replace dialog to search for a single literal tilde.
In Excel, the tilde (~) is a special escape character used to indicate that the following character should be treated literally, not as a wildcard. To tell Excel you are looking for an actual tilde, you must escape the tilde with another tilde.
Press Ctrl + F on your keyboard to open the Find and Replace dialog box.
In the 'Find what' input field, type two consecutive tildes (~~).
Click 'Find Next' to locate instances of a single tilde, or switch to the 'Replace' tab to swap literal tildes with your desired text.

Escape the Tilde in VLOOKUP and Match Formulas
Use the SUBSTITUTE function within your lookup formulas to double the tilde, preventing Excel from treating it as a wildcard.
Handle Wildcards and Formulas Seamlessly in WPS Office
WPS Spreadsheet fully supports advanced formula functions, wildcard searches, and escape characters like the tilde. You can manage complex data matching and lookup functions just as smoothly as in Microsoft Excel.
- 1. Open Your Workbook: Launch WPS Spreadsheet and open the document containing your data.
- 2. Find Literal Tildes: Press Ctrl + F, type ~~ in the search box, and click Find Next.
- 3. Use Lookup Formulas: Type your lookup formula, such as =VLOOKUP(SUBSTITUTE(D1,"~","~~"),A:B,2,0), to accurately match data.

Frequently Asked Questions
Why does Excel use the tilde as an escape character?
In Excel, the asterisk (*) and question mark (?) are wildcard characters used for partial text matches. The tilde (~) is placed before these wildcards to indicate that you want to search for the actual asterisk or question mark as standard text, rather than using them as wildcards.
How do I search for a literal question mark or asterisk in Excel?
To search for a literal question mark or asterisk, type a tilde followed by the character in the Find box. For example, type ~? to find a question mark, and ~* to find an asterisk.
Can I disable wildcards in Excel VLOOKUP?
No, VLOOKUP natively utilizes wildcards when the match type is set to exact (0 or FALSE). You cannot turn off this feature. If your lookup values contain wildcards or tildes, you must use the SUBSTITUTE function to escape them.




