# VBA MINUTE Function

Home ➜ VBA Functions LIST (Category Wise) ➜ **How to use the VBA MINUTE Function (Syntax + Example)**

**What is VBA MINUTE Function**

The VBA MINUTE function is listed under the time category of VBA functions. When you use it in a VBA code, **it can get minute value from a valid time value as per VBA**. As you know a valid VBA time is made up of hours, minutes, and seconds so it takes minutes and ignores the rest of the part. It’s just like the MINUTE function in the worksheet.

## how to use it

To use VBA's MINUTE function you need to understand its syntax and arguments:

### Syntax

**Minute(Time)**

### Arguments

**Time**: A valid time as per VBA from which you want to get the minute value.

## Example to use MINUTE Function in VBA

To practically understand how to use VBA MINUTE function, you need to go through the below example where we have written a vba code by using it:

Sub example_MINUTE() Range("B1").Value = Minute(Range("A1")) End Sub

In the above code, we have used MINUTE to get the minutes from the time which we have in the cell A1 and in the result, it has returned 34.

## Notes

Below are some important points which you need to take care while using MINUTE function in VBA.

- If the supplied time value is NULL, then it will return NULL in the result.
- If the value specified is a value other than a valid time or a string that can't be recognized as a valid time, VBA will return the run-time 13 error.

## Related Functions

About the Author

Puneet is using Excel since his college days. He helped thousands of people to understand the power of the spreadsheets and learn Microsoft Excel. You can ﬁnd him online, tweeting about Excel, on a running track, or sometimes hiking up a mountain.