Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Correcting If statement looking for multiple strings
#4
Solved: 10 Years, 9 Months, 2 Weeks ago
You can also use Instr function.
Code:
str="CLIENT DOCUMENTS - WBS" or "COMMISSION REPORTS BY SUB / BRANCH / REP" or "BRANCH REPORT SEARCHES" or "SUB-FIRM REPORT SEARCHES" or "FIRM REPORT SEARCHES"
GroupName="CLIENT DOCUMENTS"
if instr(1,str,GroupName) > 0 then
print "String exists
else
print "String does not exist"
end if

If your string values are dynamic, better use dictionary object.
Reply


Messages In This Thread
RE: Correcting If statement looking for multiple strings - by anemuday - 10-31-2011, 04:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Wink compare strings and perform action Forrest Gump 4 26,481 09-06-2011, 11:55 AM
Last Post: Rohan
  If statement with multiple conditions mv8167 4 13,288 08-20-2011, 08:34 PM
Last Post: Arul

Forum Jump:


Users browsing this thread: 1 Guest(s)