VBA Minute Function

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on July 19, 2021

Minute Description

Returns the minutes (a number from 0 to 59) from a time value.

Simple Minute Examples

Here is a simple Hour example:

Sub Minute_Example()
    MsgBox Minute(#8/14/2019 5:25:00 AM#)
End Sub

This code will return 25.

Minute Syntax

In the VBA Editor, you can type  “Minute(” to see the syntax for the Minute Function:

The Minute function contains an argument:

Time: A valid time.

Examples of Excel VBA Minute Function

MsgBox Minute("8/14/2019 15:33:00")

Result: 33

MsgBox Minute(#8/14/2019 5:12:00 PM#)

Result: 12

MsgBox Minute("6:48:00")

Result: 48

MsgBox Minute(Now)

Result will be the minute of the current system time.

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as

Learn More!

VBA Code Examples Add-in

Easily access all of the code examples found on our site.

Simply navigate to the menu, click, and the code will be inserted directly into your module. .xlam add-in.

(No installation required!)

Free Download

Return to VBA Code Examples