Hello All,
I have Case or Incident Numbers in Column A. Column B has log created dates. Column C has log closed dates.
End result will be the number of cases that do not have repeat logs.
I need to find duplicate case numbers and then compare the logs. If there is not a duplicate case number, Column D needs to say No (it says original in my sample for visual purposes). If there is a duplicate case number, then it needs to look at the first log closed date and look at the duplicate log and decide if it was created before or after that activity closed. If it is before it does not meet my criteria, the log must be closed. If it is after, a simple yes or repeat would work.
I put an array in column E to find the max date for the case number but i think VBA is going to be the way to get this done. In my sample I have included 21 lines however my data contains over 600,000 rows of data.
I thought the max column would help me but I need it to look from the row down.
Case 1
1st Log Created 8/01/2009 08:00 AM Log Closed 8/01/2009 10:00 AM
2nd Log Created 8/01/2009 11:00 AM Log Closed 8/10/2009 10:00 AM
3rd Log Created 8/03/2009 08:00 AM Log Closed 8/05/2009 10:00 AM
4th Log Created 8/12/2009 08:00 AM Log Closed 8/15/2009 10:00 AM
So, first log is the original. 2nd log would be a repeat. 3rd log cannot be a repeat because the 2nd is still open. 4th log would be a repeat because the second log closed.
Hope that is clear enough. Any help appreciated. Thanks
Bookmarks