Working with Worksheet Functions
To calculate elapsed time, subtract an earlier time from a later one, like so:
In one cell – cell A1, or wherever – enter one time, using am/pm or 24-hour clock notation.
In another cell – cell A2, or wherever – enter another, later, time, again using am/pm or 24-hour clock notation.
Right-click the cell containing the formula and select Format Cells from the shortcut menu.
In the Format Cells dialog box, click the Number tab.
In the Category list, pick Custom.