i'm looking at your workbook and still a little fuzzy on what you want to do with this. could go through the first 5 or so rows and write out what you're expecting to see?
Attached is a spreadsheet of what I am hoping to do which is compare elapsed time between when someone has a busy code of "AT" an then enters a busy code of "98". I would likely filter out the 98 codes that were not compared as I am looking only for the first instance of "98" to compare to the "AT code that proceeds it...
ElapsedTime Example.xlsx 11.9 KB