Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field that contains codes (relevant to the company I work for). I want to search this field to determine if it contains any character in a specified array.
What I would usually do in excel is:
$AS2 = "GCBZ"
IF(COUNT(SEARCH({"A","R","C"},$AS2,1))>0,"Found it, do this!","Not Found - Try again!")
This would return "Found it, do this!" as the cell contains "C"
I can repeat the above in QV but only by doing the following:
[ProgStage]) = "GCBZ"
IF(WILDMATCH(UPPER([ProgStage]),'A*','*A*','*A'.'R*','*R*','*R','C*','*C*','*C')>0,"Found it, do this!","Not Found - Try again!")
Is there any way I can do the above formula without repeat three instances of each character - sometime I have to search for 15 different characters - 45 options.
The letters will not always appear in the same order and may or not be at the beginning / end of the string. I've also tried using index() but obviously this is for one search string.
Any help would be appreciated.
Thanks in advance
Chris
What about FindOneOf() string function?
If(Len(ProgStage)>len(PurgeChar(UPPER(ProgStage),'ARC')),'Found it, do this','Not Found - Try again!')
What about FindOneOf() string function?
If( FindoneOf(ProgStage,'ARC') ,'Found it, do this','Not Found - Try again!')
-Rob