This is an overview.
Method 1 – Using an Excel Formula to Calculate Time Difference in Minutes
Step 1: Find the Time Difference in Dates
- Enter the following formula.
= (C5-B5)
It will calculate the difference between the two dates in days and show the result with decimal places.
Step 2: Use a Formula to Calculate the Time Difference
- Enter the following formula to convert the previous output into minutes.
=(C5-B5)*24*60
- Press Enter to see the results in minutes.
- Drag down the Fill Handle to see the result in the rest of the cells.
Read More: How to Subtract Date and Time in Excel
Method 2 – Combining the DAYS, HOUR, and SECOND Functions to Calculate the Time Difference
Step 1: Find the Difference in Days
- Enter the following formula with the DAYS function.
=DAYS(C5,B5)
### is displayed, as no specific format is defined.
- Click Number.
The number of days will be displayed.
- Drag down the Fill Handle to see the result in the rest of the cells.
Step 2: Count the Time Difference in Minutes
- Enter the following formula with the MINUTE function to calculate the minute difference on a particular day (10:30 A.M. to 10:53 A.M.).
=MINUTE(C5-B5)
The minute difference: 23 minutes is displayed in E5.
- Drag down the Fill Handle to see the result in the rest of the cells.
Step 3: Apply the SECOND Function
- Enter the following formula with the SECOND function.
=SECOND(C5-B5)
You will see the time difference in seconds.
- Drag down the Fill Handle to see the result in the rest of the cells.
Step 4: Use the HOUR Function
- Enter the following formula with the HOUR function.
=HOUR(C5-B5)
The time difference in hours is displayed in E5.
- Drag down the Fill Handle to see the result in the rest of the cells.
Step 5: Apply the Final Formula
- Enter the following formula.
=D5*24*60 +E5*60 + F5 + G5/60
You will see the time difference in minutes.
- Drag down the Fill Handle to see the result in the rest of the cells.
Read More: How to Calculate Difference Between Two Times in Excel
Method 3 – Running a VBA Macro to Calculate the Time Difference in Minutes
Step 1: Create a Module
- Press Alt + F11 to open the VBA Macro.
- Click the Insert tab.
- Select Module.
Step 2: Enter the VBA code
- Enter the following VBA code.
Sub TimeDifference()
'Define variables
Dim MinDifference As Variant
Dim StartTime As Variant
Dim EndTime As Variant
'Insert Input box to select start time
Set StartTime = Application.InputBox("Select Start Time:", "ExcelDemy", RngText, , , , , 8)
'Insert Input box to select start time
Set EndTime = Application.InputBox("Select End Time:", "ExcelDemy", RngText, , , , , 8)
'Subtract times
MinDifference = EndTime - StartTime
'Apply formula in a cell to get the result in minutes
Range("E5").Value = MinDifference * 24 * 60
End Sub
Step 3: Run the Program
- Save the program and press F5 to run it.
- Select start time.
- Press Enter.
- Select end time.
- Click OK.
- The time difference in minutes in is displayed in E5.
Read More: How to Subtract Minutes from Time in Excel
Download Practice Workbook
Download the practice workbook.
Related Articles
- How to Calculate Time Difference in Numbers
- [Fixed!] VALUE Error (#VALUE!) When Subtracting Time in Excel
- How to Subtract and Display Negative Time in Excel
- How to Subtract Time and Convert to Number in Excel
- How to Subtract Hours from Time in Excel
- How to Subtract Military Time in Excel
<< Go Back to Subtract Time | Calculate Time | Date-Time in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!