This is my test results: Is this what you expect? data have;
input (ID Contact1 Contact2 Contact3) (:$20.);
cards;
1 Bob Sarah Elizabeth
2 John Sarah Jean
3 Peter Sarah Elizabeth
4 Jean Peter John
5 Peter Jean Elizabeth
;
proc print data = have;
WHERE contact1 not in ('Bob','Elizabeth') and contact2 not in ('Bob','Elizabeth') and contact3 not in ('Bob','Elizabeth');
RUN; Results: SAS Output The SAS System Obs ID Contact1 Contact2 Contact324 2 John Sarah Jean 4 Jean Peter John
... View more