Third idea:
Id. date. Journal Duration A1. 03/01/20. ABCD. 1
A2. 03/01/20. BCDA. 4
Take what you have but save and concatenate Col: variables into long strings. We over here, call strings names like this "Journey" or "Journal" because they usually are chronologically ordered for us. Using appropriate logic, change the Journal strings with Find(), Scan(), SubStr(), TranWRD(), etc. to arrive at what you want.
I employ regular expressions (i.e. PRXmatch() etc.) to make matches in this context, because it eliminates a lot of if-then structures, but maybe your logic is simple enough to avoid regexp.
... View more