The tilde is used to flag Excel not to treat the following character as a special (wildcard) character. Normally it's used before an asterisk or ? to indicate to search for the next character literally, not as a wildcard character.
If you use two tildes in a row, does that work?