V
V
Vyacheslav Grachunov2021-08-22 09:27:26
Visual Basic
Vyacheslav Grachunov, 2021-08-22 09:27:26

Why doesn't Excel search work if there is a tilde "~" in the value?

Search in Excel does not work if there is a tilde "~" in the value.
Literally. On the sheet there is something like "Cowberry deputy ~ 10 - 12 kg RUSSIA 730" and if you try to find it through the search with the full name, nothing comes up. It doesn't work as a simple search on the sheet or through the VBA method Range.Find
I need it through VBA. Are there options to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Boev, 2021-08-22
@Qwentor

These are wildcards.
? - any single character;
* – any number of any characters, including zero characters;
~ - put a tilde before ?, * and ~ to stand for themselves
To make a tilde stand for itself in a pattern, you need to write it twice: ~~

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question