@alan20alan:
Still true: If you have thousands of strings to check for, you either need to type them one by one as literal strings, or to find a simpler way to describe them all based on a common and exclusive syntactical scheme or to generate them all by code based on a generative scheme, or to invent a new way to get them in a bag.
Once you decided -regarding realistic limitations- which one of these ways you want to go, we can start to discuss the details and to suggest an actual solution.
The question “…how to put multiple value in this code: if oCell.value = 5 then
…” only has one answer: No realistic way for thousands of alternatives.
The question “How to decide if a string is starting with an integer followed by one of the separators “-#%” and then by one of the strings 20220901
or 90991224
?” has a very simple answer: Use the regular expression
[\-+]?\d+[\-#%](20220901|90991224)
If you then aren’t sufficiently experienced with the usage of RegEx we can help.
If you refuse to learn the basics first, but expect us to be sorcerers knowing a spell for every miracle to happen, you (and we) will fail.
BTW: Dont tell me 20220901
is not a date (it is by ISO standards), but tell me what the second part of your “sn” actually is, and how the cases needing to be treated are distinguished from the others.
Otherwise choose the type alternative, type all the special “sn” strings into the cells of an empty column, and we can tell you how to find the rows where such a value is present in a different column. The process may take time because it basically requires n*m comparisons for n rows needing a test with m alternatively accepted strings. n = 100000, m = 1000 makes 100 million comparisons, you know.
Aha! But if you can allow for sorting the data and for sorting the special “sn” strings as well, you can get highly improved efficiency. We know a few tricks after all.