Hi All,
I am currently working on some Excel VBA code which performs a Vlookup, however i have hit a snag as some of the values which im looking up contain wildcards (*, ?, ~) which cause the lookup to return incorrect values.
I can resolve this using an excel formula which would look like this:
VLOOKUP(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"~","~~"),"?","~?"),"*","~*"), A2, OpidReport, 2, False)
However i have no idea how i would incorporate this into VBA code other than it would start application.worksheet.function.substitute
Is anybody able to offer any advise on this?
Thanks,
I am currently working on some Excel VBA code which performs a Vlookup, however i have hit a snag as some of the values which im looking up contain wildcards (*, ?, ~) which cause the lookup to return incorrect values.
I can resolve this using an excel formula which would look like this:
VLOOKUP(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"~","~~"),"?","~?"),"*","~*"), A2, OpidReport, 2, False)
However i have no idea how i would incorporate this into VBA code other than it would start application.worksheet.function.substitute
Is anybody able to offer any advise on this?
Thanks,