If you want to subtract time in Excel, it helps to understand the way that Excel stores times.
Times are stored as positive decimal values in Excel. It is only the formatting of an Excel cell that causes its contents to be displayed as a time, rather than a decimal.
The table below shows examples of decimals and the times that they represent in Excel.
As times are stored as simple decimal values, you can subtract time in Excel in the same way that you can subtract any other numbers. Therefore, to subtract time in Excel:
(The easiest way to format a worksheet cell to display a time is to select the cell and then select the 'Time' format from the drop-down menu in the Home tab of the Excel ribbon).
Column C of the following spreadsheet shows four simple Excel time subtraction formulas.
In each case, the time in column A is subtracted from the time in column B.
If you have a cell containing a positive decimal value, this can be diplayed as a time, by formatting the cell with a time format.
The easiest way to do this is to select the Time formatting from the drop-down format menu, which is generally located in the 'Number' group, on the Home tab of the Excel ribbon (see below):
If you want to use a different time format, select More Number Formats ... from the drop-down format menu to open up the 'Format Cells' dialog box. Within this dialog box, you can select one of several pre-programmed Time formats or define your own Custom format.