How to Use the MINUTE Function in Excel – 6 Examples

The Excel MINUTE Function

The MINUTE formula

  • Summary

The MINUTE function returns the number of minutes in a given time value. For example, if the time value is “10:30 AM”, the function extracts 30 minutes.

  • Return Values

0 to 59 (in number format).

  • Syntax
=MINUTE (serial_number)
  • Arguments
Argument Required/Optional Explanation
serial_number  Required A valid time value
Note: In previous Excel versions,  enter the time value inside quotations.


Example 1 – Extracting Minutes from Time Values Using the MINUTE Function

This is the sample dataset.

Steps:

  • Select D5.
  • Enter the following formula.
=MINUTE(B5)

Pulling Minutes from Time Value Using MINUTE Function

  • Press Enter.

  • Drag down the Fill Handle to see the result in the rest of the cells.

Extracting Minutes from Time Value Using MINUTE Function

  • To find the current minutes in D13, enter the following formula.
=MINUTE(NOW())

  • Press Enter.


Example 2 – Combine the TIME and MINUTE Functions in Excel

Steps:

  • Select C5.
  • Enter the following formula.
=TIME(7,MINUTE(B5),0)

Combination of TIME and MINUTE Functions in Excel

  • Press Enter.

  • Drag down the Fill Handle to see the result in the rest of the cells.


Example 3 – Using the Excel MINUTE Function with IF Statements

Steps:

  • Select C5.
  • Enter the following formula.
=IF(MINUTE(B5)<30,B5,0)

Using MINUTE Function with IF Statements

  • Press Enter.

  • Drag down the Fill Handle to see the result in the rest of the cells.

Formula Breakdown

IF(MINUTE(B5)<30,B5,0): if the minute value in B5 is less than 30, it will return the time value in B5. Otherwise, It will return zero. The output is 25.


Example 4 – Calculate Time in Excel using the MINUTE Function

To find the end time of a session, knowing its starting time and duration in minutes:

Steps:

  • Select C5.
  • Enter the following formula.
=TIME(HOUR(B5),MINUTE(B5)+C5,SECOND(B5))

Provide A New Time in Excel with MINUTE Function

  • Press Enter.

  • Drag down the Fill Handle to see the result in the rest of the cells.


Example 5 – Use the MINUTE Function to Compute Difference in Minutes

The dataset showcases starting and ending times.

Steps:

  • Select C5.
  • Enter the following formula.
=TIME(HOUR(B5),MINUTE(B5)+C5,SECOND(B5))

Insert MINUTE Function to Compute Difference in Minutes

  • Press Enter.

  • Drag down the Fill Handle to see the result in the rest of the cells.


Example 6 – Using a VBA Code to calculate Minutes in Excel

Steps:

  • Go to the Developer tab.
  • Select Visual Basic.

  • In Insert, select Module.

  • Enter the following code.
Sub Minute_Function()
Dim i As Integer
For i = 5 To 12
Cells(i, 4).Value = Minute(Cells(i, 2))
Next i
End Sub
  • Close the Visual Basic window.
  • Go to the Developer tab.
  • Select Macros.

  • In the Macro dialog box, select Minute_Function in Macro name.
  • Click Run.

Embedding VBA Code to Get Minutes in Excel

This is the output.

Applying VBA Code to Get Minutes in Excel

VBA Code Breakdown

Sub Minute_Function()

names the sub-procedure.

Dim i As Integer

declares the variable.

For i = 5 To 12

performs a for loop and defines the variable: from 5 to 12.

Cells(i, 4).Value = Minute(Cells(i, 2))

defines the cell to extract the number of minutes. Define the cell from which  the number of minutes is extracted.

Next i

denotes the next variable so that the loop starts from the beginning in the next cell.

End Sub

ends the sub-procedure.


Common Errors While Using MINUTE Function

Common Errors When They Show
#VALUE! an invalid time format is inserted as a serial number

Download Practice Workbook

Download the practice workbook.


 

<< Go Back to Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdul Kader
Md. Abdul Kader

MD. ABDUL KADER is an engineer with a talent for Excel and a passion for VBA programming. To him, programming is like a time-saving wizard, making data manipulation, file handling, and internet interactions a breeze. His skill set extends to SWM, GIS, RS, and SPSS. He holds a B.Sc in Urban & Regional Planning from Chittagong University of Engineering and Technology and has shifted to become a content developer. In this role, he crafts technical content centred around... Read Full Bio

2 Comments
  1. this was very helpful. I was doing a speed comparison in % per min. Use of the “minute” allowed me to convert the time difference in minutes only.

    • Hello Rahat,

      Thanks for your feedback and appreciation. Glad to heart that our article helped you to do the speed comparison in minutes.
      Keep exploring Excel with ExcelDemy!

      Regards,
      ExcelDemy

Leave a reply

Close the CTA

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo