Hello,

Thanks in advance for feedback. I am new to vba, so please be patient if the question seems elementary.

Every two weeks I get an updated spreadsheet that contains appointment dates and times of people coming in to see a doctor. The problem is that I may get duplicates when I get the next list of new appointments two weeks later. I may have as may as 100 patients one week and 200 patients the next.

So my question is:

How do I compare the previous two weeks spreadsheet with the current two week spreadsheet and find the most current appointment date and time for a particular patient and have only that row populated into a third spreadsheet. I have a unique medical number for each of the patients.

The format of the appt dt is : 11/23/2009 8:30:00 AM
/*
appt dt mrn lastname firstname Middle exname dateofbirth patient-address1 patient-address2 patient-city patient-state patient-zipcode patientphone patientencounters-primaryprovidername
*/