I inherited a huge file where I have to compare data across multiple columns: i.e. patient name, date of service, etc. The two fields I really need to focus on are the patient's name and the date of service -both columns have to be an exact match to determine if there is a duplicate. Using Conditional Formatting it highlights everything that is a duplicate even if the patient name is not but the date of service is. Is there an easy formula to compare data for patient names in column A and also find any duplicates of the same patient with multiple dates of service? I'm reviewing the file for patients who may have been charged multiple visits on the same date. Any help or guidance is greatly appreciated. Thank you.
Hello there. You can use a helper column for this. Insert a new column into your data set. Assuming for the moment that Patient Name is in column A and Date of Service is in column B and your new helper column is column C with headers in row 1, then in C2 your formula would be: =A2&B2
Then you could add conditional formatting to highlight duplicates (Home > Conditional Formatting > Highlight Cells Rule > Duplicate Cells... ). This will highlight all duplicates, including the first one. If you wanted to not highlight the first duplicate but all others below it, you could use a custom formula for your conditional formatting, such as: =COUNTIF(C$2:C2,C2)>1
The above formula assumes you've selected C2 through the last row of data in C2. The important part is the range is relative to what you have selected. So if you select the entire column, with C1 being the active cell when applying the conditional format formula, the formula would be adjusted to: =COUNTIF(C$1:C1,C1)>1