Is there a way to create an IF statement to locate a string of text?
I’ve tried ^=IF(DB2 =*offender*,”Offender”,IF(DB2 =* arrest*,”Arrest “, IF(DB2=*assault*,”Assault”,IF(DB2 =*Restrain*,”Restrain”,IF(DB2 =*dog*,”Dog”,””)))) and excel doesn’t seem to like the *’s.
I have a comment field and I want to be able to identify certain situations and by isolating only those comments that contain the above mentioned words. I thought that by inserting the above formula, I could then pivot the results to get just the items I want.
I’ve tried searching excel help to no avail and only found
^=IF(ISERR(SEARCH(“solo”,D1)),1,0)
on this site, which doesn’t really support the multiple words I am looking for.
Does anyone have any suggestions as to what I might try?
Thanks