wackywoo105
Registered User.
- Local time
- Today, 12:26
- Joined
- Mar 14, 2014
- Messages
- 203
I'm trying to match a number with a string that may contain the number.
e.g.
Hi = "07123456789"
Bye = "07098765432, 07123456789, 07102938475"
so if Hi is anywhere in Bye it returns true.
e.g. If "*" & Hi & "*" like Bye then msgbox "bingo"
However it never works and is always false, unless the 2 strings are identical. I've tried instr() also which I cant get to work.
For another function I split the Bye into an array to separate out the numbers and cycled through them, but would like an easier way if possible?
Can anyone suggest anything? Also why does this work for text but not for numbers?
e.g.
Hi = "07123456789"
Bye = "07098765432, 07123456789, 07102938475"
so if Hi is anywhere in Bye it returns true.
e.g. If "*" & Hi & "*" like Bye then msgbox "bingo"
However it never works and is always false, unless the 2 strings are identical. I've tried instr() also which I cant get to work.
For another function I split the Bye into an array to separate out the numbers and cycled through them, but would like an easier way if possible?
Can anyone suggest anything? Also why does this work for text but not for numbers?