search - Using Instr VBA with values with Commas -
i'm trying compare title of chart search string. if search string in title of chart, want homecoming true
.
currently, i'm using instr(target, search) > 0
however, of titles in charts have string , comma such as: daimler, international
because of comma, instr doesn't find string , doesn't run. how utilize instr consider letters , not comma?
i didn't realize commas problem instr
. if true, replace()
before doing instr
, like:
instr(replace(target, ",", ""), search) > 0
vba search
No comments:
Post a Comment