Hi Tal, I would like to update the reply from Jagadishkatam, Please try with following Data have; input FNAME$ LNAME$ ID SCORE$; datalines; John smith. 100 a John smith. 100 b Tom. Fonda. 200 a Tom. Fonda. 300 b Mila. Fonda. 400 a Mila. smith. 500 a Zen Fonda. 600 b Tom. smith. 700 c ; run; proc sort data=have; by FNAME LNAME ID; run; data want; set have; by FNAME LNAME ID; if first.ID then ISEQ=1; else ISEQ+1; if first.LNAME then LSEQ=1; else LSEQ+1; run; data all (drop=ISEQ LSEQ); merge want have; by FNAME LNAME ID; if ISEQ eq LSEQ; run; Hope it will work for you, Please share if any abnormal observations. Thank you Jagadishkatam for hint Thanks and Regards, Yogesh
... View more