Obtain and Subtract Military Time in Excel
Obtain and Subtract Military Time in Excel. In Excel, there are different ways to obtain and subtract military time. Below are the explanations of each method:
Convert Normal Time into Military Time using the TEXT Function
To convert normal time into military time using the TEXT function, you can follow the steps below:
- Suppose you have the time in cells A1 and A2, in AM and PM respectively.
- In an empty cell, enter the formula =TEXT(A1,”HHMM”) to convert the time in cell A1 to military time.
- Repeat the same formula for cell A2 to convert the time in cell A2 to military time.
- Now, you have both times in military format, without the colon.
Get Military Time using Custom Formatting
To get military time using custom formatting, follow the steps below:
- Select the cell or range of cells where you want to display the military time.
- Use the keyboard shortcut Control + 1 to open the Format Cells dialog box.
- Select the Custom option from the list of formats.
- In the input box, enter the existing format, if any.
- In the Type box, enter “HHMM” as the format.
- Click OK to apply the format and display the time in military format, without the colon.
Subtract Military Time
To subtract military time in Excel, you can follow the steps below:
- Subtract the smaller time from the larger time to get the time difference.
- Format the result as time by using the time format option or the TEXT function with the appropriate time format.