Match with tilda characater
The tilde is sort of what you might call a wildcard "delimiter". It tells
Excel that the common wildcards, * and ?, are not wildcards in certain uses.
For example:
A1 = AA
A2 = XX
A3 = X?
A4 = GH
The lookup value in B1 is X?.
If you use:
=MATCH(B1,A1:A4,0)
The result will be 2 because Excel sees the ? as a wildcard and XX matches
that criteria. So, the tilde is used to tell Excel that in this case the ?
is not a wildcard and is in fact just a common question mark:
So, you can make the lookup value in B1: X~?
=MATCH(B1,A1:A5,0) = 3 (X?)
Or, make the lookup value in B1: X
=MATCH(B1&"~?",A1:A5,0) = 3 (X?)
Biff
"IanW" wrote in message
.243...
Thanks for the reply(s). Actually I had a double trailing '~' so I would
have needed '~~~~'. I did think of checking if teh ~ was a special char.
Just did look now but can't find anything about it (easily) in the help.
What is ~ used for?
Thanks
Ian
"Biff" wrote in
:
The tilde is a special character in Excel.
A4 = d~
Lookup value in B1 = d~
=MATCH(B1&"~", A1:A6, 0)
Or, make the lookup value: d~~ (that's d and 2 tildes)
=MATCH(B1, A1:A6, 0)
Biff
|