I am in need of a formula that will loop through records in a table and calculate the time between two dates. The fields include a ticket number{NUMBER_SC}, the status of the ticket status {TYPE}(could be any of the following: open, assignment, reasignment, suspended, unsuspended, resolved, closed and a few others) and the date/time field{DATESTAMP}. One ticket number will have (many) records. Each time a user changes the ticket status {TYPE} a new entry is made into the table in cronological order{DATESTAMP}. I need to loop through each ticket number and find where the {TYPE} = "Suspend" and then find the next record where the {TYPE} = "Unsuspend". I will then need to find the difference between the two dates in seconds. One more thing, the same ticket can be suspended/unsuspended more than once. In that case I need to find the TOTAL seconds for all of the suspend/unsuspends. I am using CR8.0. I hope I have provided enough info. If it would help to see a snapshot of the table I could send it if needed.