How to Use MINUTE Function in Excel (6 Suitable Examples)

The MINUTE in Excel is a built-in function that is classified as a Date/Time function. It can be found on the Formulas tab of the Ribbon. In this article, I’ll discuss the ins and outs of the function, starting from the basics to VBA code, including 6 practical examples.


Excel MINUTE Function: Syntax & Arguments

Now, we’ll see the syntax and argument of the function. If you insert the function after entering the equal sign (=), you’ll see the following type of scenario.

The MINUTE formula

  • Summary

The MINUTE function returns the number of minutes in a given time value. For example, if the time value is given as “10:30 AM”, the function will extract 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
  • Version

All versions of Microsoft Excel have the MINUTE function.

Note: In the previous version of Excel, you couldn’t enter the time value without quotations. But in Microsoft 365, it is possible. Besides, the serial number would be fractional, as you know the positive integer serial number represents a particular day in Excel.

How to Use MINUTE Function in Excel: 6 Suitable Examples

To use the MINUTE function in Excel, we have found six different examples so that you can have a clear idea about this topic. Here, we would like to utilize several examples including VBA code, MINUTE function, and a combination of MINUTE and other functions. When you go through these examples, you may gather profound knowledge regarding the MINUTE function.


1. Pulling Minutes from Time Value Using MINUTE Function

You can extract the number of minutes using the function easily. The time value may be in 9 types of different formats. However, you’ll get an accurate value. First of all, we take a dataset including some time value and its format. We would like to figure out the minutes using the MINUTE function.

To understand the example, follow the steps.

Steps:

  • First, select cell D5.
  • Then, write down the following formula.
=MINUTE(B5)

Pulling Minutes from Time Value Using MINUTE Function

  • Press Enter to apply the formula.

  • After that, drag the Fill Handle icon down cell D12.

Extracting Minutes from Time Value Using MINUTE Function

  • Then, in cell D13, we would like to find the current minutes from the current value.
  • So, write down the following formula.
=MINUTE(NOW())

  • Press Enter to apply the formula.


2. Combination of TIME and MINUTE Functions in Excel

Imagine you have an hour value, and you want to produce a new time with a new minutes value regarding that hour value. In this example, we would like to use the combination of TIME and MINUTE functions. To understand the process, follow the steps.

Steps:

  • Firstly, select cell C5.
  • Then, write down the following formula.
=TIME(7,MINUTE(B5),0)

Combination of TIME and MINUTE Functions in Excel

  • Press Enter to apply the formula.

  • Afterward, drag the Fill Handle icon down the column.


3. Using Excel MINUTE Function with IF Statements

The IF function is mainly used to verify logical statements. For example, the time value is provided with a condition e.g. the time value will be counted if it is less than 30 minutes otherwise the value will be 0. In that case, you may utilize the combination of IF and MINUTE functions. To understand it clearly, follow the steps.

Steps:

  • First of all, select cell C5.
  • Subsequently, write down the following formula.
=IF(MINUTE(B5)<30,B5,0)

Using MINUTE Function with IF Statements

  • Press Enter to apply the formula.

  • Finally, drag the Fill Handle icon down the column.

🔎 Breakdown of the Formula

IF(MINUTE(B5)<30,B5,0): The IF function is mainly used to verify logical statements. Here, we define a statement if the minute value of cell B5 is less than 30, it will return the time value of cell B5. Otherwise, It will return zero. So, the minute value of cell B5 is 25 which is less than 30, this formula will return the same time value as cell B5.


4. Provide a New Time in Excel with MINUTE Function

Now, we’ll see some interesting stuff. Assuming that starting time (time starts), and the required minutes of a session are given, you have to find the end time (time ends) of the session. To understand the example clearly, follow the steps.

Steps:

  • In the beginning, select cell C5.
  • Next, write down the following formula.
=TIME(HOUR(B5),MINUTE(B5)+C5,SECOND(B5))

Provide A New Time in Excel with MINUTE Function

  • Press Enter to apply the formula.

  • Lastly, drag the Fill Handle icon down the column.


5. Insert MINUTE Function to Compute Difference in Minutes

You can also calculate the difference between start time and end time. By doing this, you will get the required minutes. In this article, we will show the difference in minutes using the MINUTE function. We take a dataset that contains some starting times and ending times.

To understand the example, follow the steps.

Steps:

  • Firstly, select cell C5.
  • Then, write down the following formula.
=TIME(HOUR(B5),MINUTE(B5)+C5,SECOND(B5))

Insert MINUTE Function to Compute Difference in Minutes

  • Press Enter to apply the formula.

  • Then, drag the Fill Handle icon down the column.


6. Embedding VBA Code to Get Minutes in Excel

If you have a larger dataset, it is time-consuming and a little bit boring to get the required result using a formula. Rather you can utilize the VBA code in Excel which performs the result rapidly and accurately. Now, let’s see how you can apply the VBA code to calculate the number of minutes.

Steps:

  • First, go to the Developer tab on the ribbon.
  • Then, select the Visual Basic option from the Code group.

  • It will open up the Visual Basic window.
  • Then, go to the Insert tab at the top.
  • After that, select the Module option.

  • As a result, a Module code window will appear.
  • Write down 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
  • Then, close the Visual Basic window.
  • Then, go to the Developer tab on the ribbon.
  • Select the Macros option from the Code group.

  • Then, the Macro dialog box will appear.
  • Select Minute_Function from the Macro name section.
  • After that, click on Run.

Embedding VBA Code to Get Minutes in Excel

  • As a result, we will get the minute value from the time value. See the screenshot.

Applying VBA Code to Get Minutes in Excel

🔎 VBA Code Explanation:

Sub Minute_Function()

First of all, provide a name for the sub-procedure of the macro.

Dim i As Integer

Next, declare the necessary variable for the macro.

For i = 5 To 12

Then, take a for loop and define the variable from 5 to 12.

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

After that, define the cell where you want to extract the number of minutes. Then, define the cell from which you want to extract the number of minutes.

Next i

Next, denote the next variable so that the loop will start from the beginning for the next cell.

End Sub

Finally, end the sub-procedure of the macro.


Common Errors While Using MINUTE Function

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

Download Practice Workbook

Download the practice workbook below.


Conclusion

This is how you can apply the MINUTE function to calculate the number of minutes. Also, you have the opportunity to combine the function with other Excel functions. If you have an interesting and unique method of using the MINUTE function, please share it with us.


<< 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

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo