I'm trying to check whether the main string contains the entire substring, even if there are interruptions.
For example:
- main string = 12ab34cd,
- substring = 1234d
should return a positive, since 1234d is entirely contained in my main string, even though there are extra characters. 
Since InStr doesn't take wildcards, I wrote my own VBA using the mid function, which works well if there are extra characters at the start/end, but not with extra characters in the middle. 
In the above example, the function I wrote
- works if the main string is ab1234dc,
- but not if it's 12ab34cd.
Is there a way to accomplish what I'm trying to do using VBA?
 
     
     
    