How to use the MINUTE function
What is the MINUTE function?
The MINUTE function returns a whole number that represents the minute based on an Excel time value. The returned number is an integer between 0 (zero) and 59.
Table of Contents
1. Introduction
What is an integer?
An integer is a whole number that can be positive, negative, or zero, but not a fraction or decimal. Excel can't calculate the minute based on negative integers.
What is an Excel time value?
Excel time is actually a decimal number ranging between 0 and 1 in Excel and then formatted as time.
For example, 12:00 PM is represented as 0.5 because it is half of a day, you can verify this by typing 12:00 PM in a cell and then change the cell formatting to general. This will show the value as Excel interprets it.
How does Excel recognize time values?
Excel recognizes certain text strings like "6:45 PM" as valid time values. A recognized time value is right aligned in the cell just like a regular number, shown in the image below in cell B2.
A time number that is not recognized is left aligned which is demonstrated in cell B4 in the image above. This visual feedback lets you easily spot values that need closer inspection.
What is a minute in an Excel time value?
There are 60 minutes in one hour and 24 hours in one day. 60 * 24 = 1440 minutes in one day.
1/1440 or approx. 0.000694 represents one minute in Excel time value. Excel uses a number 0 <= x <= 1 in decimal form to represent time in an Excel worksheet. 0 is zero minutes and 1 is 1440 minutes (24 hours).
Why is 1 day equal to 1440 minutes?
This has to do how Excel handles dates. Each date is represented by an integer and one day is equal to 1 in Excel. There are 24 hours or 1440 minutes in one day.
Dates are stored numerically but formatted to display in human-readable date/time formats, this enables Excel to do work with dates in calculations.
For example, dates are stored as sequential serial numbers with 1 being January 1, 1900 by default. The integer part (whole number) represents the date the decimal part represents the time.
This allows dates to easily be formatted to display in many date/time formats like mm/dd/yyyy, dd/mm/yyyy and so on and still be part of calculations as long as the date is stored numerically in a cell.
You can try this yourself, type 10000 in a cell, press CTRL + 1 and change the cell's formatting to date, press with left mouse button on OK. The cell now shows 5/18/1927.
Related functions
Excel Function | Description |
---|---|
HOUR(time) | Returns the hour portion of a time value |
MINUTE(time) | Returns the minute portion of a time value |
SECOND(time) | Returns the second portion of a time value |
TIME(hour,minute,second) | Creates a time value from hour, minute, and second values |
TIMEVALUE(time_text) | Converts a text time to a serial time value |
2. Syntax
MINUTE(serial_number)
serial_number | Required. An Excel time value that you want to extract the minute from. |
3. Example 1
This example demonstrates the MINUTE function in cell C3, it extracts the minute from the Excel time value specified in cell B3: "1:34:22 PM"
Formula in cell C3:
The MINUTE function returns 34.
Formula in cell C4:
The formula in cell C4 extracts the minutes from the time 1:53:05 PM, which is 53 minutes.
Formula in cell C5:
The formula in cell C5 extracts the minutes from the time 10:45:35 AM, which is 45 minutes.
Formula in cell C6:
The formula in cell C6 extracts the minutes from the time 5:25:15 PM, which is 25 minutes.
Formula in cell C7:
The formula in cell C7 extracts the minutes from the time 12:16:22 AM, which is 16 minutes.
In each case, the MINUTE function is used to extract just the minutes portion from the time value in column B, ignoring the hours and seconds.
4. Example 2
Steven starts walking at 12:05 PM and arrives at the destination at 2:10 PM. How many minutes did the walk take?
What we know:
- Start time: 12:05 PM
- End time: 2:10: PM
- Excel time values are decimal values between 0 (zero) and 1. This allows us to perform calculations to Excel time values.
In Excel, one day represents a value of 1. Since a day contains 24 hours, one hour is represented as 1/24 of a day. One minute is 1/(24*60) of a day, as there are 60 minutes in an hour and 24 hours in a day.
Formula in cell C5:
This formula calculates the difference between the time value in cell C3 and B3. This value is displayed in hours, minutes, and seconds, however, it is possible to format the output value to show only minutes even if it is larger than 59 which is the default limit.
This is done by applying cell formatting to cell C5 using this custom format code: [m] This can be easily accomplished by applying cell formatting.
- Select cell C5.
- Press CTRL + 1 to open the "Format cells" dialog box. The image above shows this dialog box below the formula.
- Select Category: Custom
- Type [m] in the Type: field
- Press the OK button to apply changes.
The image above demonstrates an alternative way to calculate the number of seconds without using cell formatting. Note that the SECOND function is not used at all, it is limited to 59 seconds the most. It can show values equal to 60 or more.
Formula in cell C5:
Here's how it works:
- (C3-B3) - This calculates the time difference between the arrival and departure times. The result will be in the format of a decimal number representing the number of days.
- 60*24 - This converts the decimal number of days into seconds.
- Multiplying by 24 converts the decimal number of days into hours.
- Multiplying by 60 again converts the hours into minutes.
In this specific case, steven started walking at 12:05 PM and arrived at the destination at 2:10 PM. The formula calculates the time difference between these two times, which is 2 hours and 5 minutes. Converted to minutes, this is 125 minutes.
5. Function not working
The MINUTE function returns #NUM! error if the decimal is a negative value.
The MINUTE function returns #VALUE! error if the Excel time value is invalid.
'MINUTE' function examples
Functions in 'Date and Time' category
The MINUTE function function is one of 22 functions in the 'Date and Time' category.
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Contact Oscar
You can contact me through this contact form