Try the STRIP function to remove leading and trailing blanks: if STRIP(medications) IN( ...) then ...; else if STRIP(medications) IN( ...) then ...; else if STRIP(medications) IN( ...) then ...; else if STRIP(medications) IN( ...) then ...; else if STRIP(medications) IN( ...) then ...; else...; Actually, after re-reading, I think you want the INDEX function: if INDEX(medications, "Atripla") >0 or INDEX(medications, "Zetia") >0 or INDEX(medications, "Combivir") >0 THEN med = 'HIV'; else if INDEX(medications, "Lisinopril") >0 THEN med = 'Blood Pressure'; else if INDEX(medications, "Pravachol") >0 THEN med = 'Cholesterol'; Or...if your trying to just flag them on each detail line... if INDEX(medications, "Atripla") >0 or INDEX(medications, "Zetia") >0 or INDEX(medications, "Combivir") >0 THEN hiv_med = 1; else if INDEX(medications, "Lisinopril") >0 THEN bp_med = 1; else if INDEX(medications, "Pravachol") >0 THEN chol_med = 1;
... View more