September 30, 2018 -- I have what I think are two questions about Office 365 (Windows 10) Excel's date and time features.

(1) For each event I enter a date and time. As the sheet is set up now I enter the date in Column A and the time in Column B. I want the sheet to subtract the earlier time from the immediately following one to show how much time passed between the two consecutive events, but a problem is that often those two times span across midnight, i.e., the second of the two times is on the day after the first of the two times. In the example below this occurs when going from Row 2 to Row 3.

[Enter Dates] [Enter Times] [Calculate Times Lapsed]
Column A Column B Column C
Row 19/4/1810:15N/A
Row 2 9/4/18 23:25 13:10
Row 3 9/5/18 6:35 7:10
Row 4 9/5/18 14:55 8:20

The formula I came up with, for Column C, is as follows:

=IF(A1 = A2,B2 - B1,B2 + 12 - B1)

This seems to work but it also seems like a kludge, and I'm hoping someone on this forum can devise a better, less error-prone, more universally applicable way to accomplish the task of deriving the time differences in Column C.

(2) I'd like to divide a number related to that period in Column C, let's say the number of boxes shelved. For example, in Row 4 the amount of time that lapsed since the previous entry is 8 hours 20 minutes, and let's say the number of boxes shelved is 400. How can I divide 400 by that 8 hours 20 minutes to show the number of boxes shelved per hour? The answer should be 80 boxes shelved per hour, but I can't figure out how to do division using time expressed as hours and minutes. Is this even possible?

I have struggled with Excel's time and date features and researched online as much as I can, and I still have no idea how to answer these two questions. Please help if you have any ideas, and I thank you in advance.