Hello
How do i add a wildcard to the IN ( ) of an IF Statement so i don't have to enter all these variables?
example:
IF [Custom 10 - Name] IN ("COV", "COV WFH", "COV WFH new service", "COVID WFH", "COV - WFH", "COV- WFH", "COVI", "COVI LUNCH") then "Y" else "" endif
Solved! Go to Solution.
HI @LisaLeach
You can't add a wildcard to the list of values but you may be able to use the below formula instead.
IF REGEX_MATCH([Custom 10 - Name], "COV.*") THEN "Y"
ELSE ""
ENDIF
Best,
Michael
Hi @LisaLeach
You can also use a Contains function: IF Contains([Custom 10-10,"COV") THEN "Y" ELSE "" ENDIF
Thank you but that didn't work for me.
Hi @LisaLeach
Can you provide a sample dataset and explain what didn't work.
I suspect that you have other records that are getting flagged when they shouldn't be. Is that right?
Best,
Michael