For a patient database, I would like to be able to pick the earliest date (occasion of service date, column B) for a certain individual (client ID, column A) for when they presented with a specific condition (presenting condition, column C). See attached spreadsheet.
For example, I would like to pick the earliest date when an individual presented for "CONTACT TB". I would also like to be able to test for different combinations for presenting conditions, e.g. earliest date when somebody presented with either "CONTACT TB" or "CHEMOPROPHYLAXIS".
Additional challenge: Not every individual has the same number of occasion of service dates and some fields contain no information. Also, not everybody in the database will have the presenting condition I'm looking for.
I'm just an Excel user, but don't know much about programming. I think that maybe a Pivot table could help to solve the problem. Although I can get a good overview in a Pivot Table with "Client ID" and "OOS data" as row labels, "Presenting condition" as column label and "count of presenting condition" in values, I don't know how to automatically always pick the earliest date for a certain condition.
Any help with this problem would be greatly appreciated.
Cheers,
cat2000
Bookmarks