Thanks to you both. ballardw, there is no unique ID in the dataset unfortunately. Here is a fictional account of my data and what I am looking for more specifically. My table has 4 variables overall as shown below and currently looks like (A). There seems to be 5 patients admitted to hospital J with the last name of Burns in 2012 but on careful inspection obs 1 and 4 are likely to be the same person but the spelling of the first name differs. As my dataset has over 14,000 records, I would need syntax that would mark many of these records for me as I cannot visually inspect the entire dataset in the time permitted. When all is said and done, I would like to have a dataset like that of (B). A: obs Last Name First Name Date of Birth Number_of_Admissions 1 Burns Daisy 5/3/2008 16 2 Burns Dana 1/1/1978 2 3 Burns Daniel 9/8/1998 8 4 Burns Daysi 5/3/2008 4 5 Burns Dwayne 5/3/2008 20 B: obs Last Name First Name Date of Birth Number_of_Admissions 1 Burns Daisy 5/3/2008 20 2 Burns Dana 1/1/1978 2 3 Burns Daniel 9/8/1998 8 4 Burns Dwayne 5/3/2008 20
... View more