Need Help figuring time difference

I have a spreadsheet that brings in multiple fields of data. I need to figure out a formula that will allow me to figure the amount of time worked on each customer by each representative. My event field is either Record opened, Record saved, Record closed, or start create record. The only two that matter for figuring time worked are record opened and record closed. Any idea on how I can figure the time worked on each customer and sort it by representative who did the work? I have attached a sample of what my spreadsheet looks like for reference. Thanks!! Any assistance would be appreciated!!

AttachmentSize
test1.xlsx11.21 KB