Excel Macro Timer - Easy to Use

Add to Favorites
Author: | Edits: don

Simple but precise macro timer code that allows you to speed test any macro or part of a macro and then record the results so that you can compare them and tweak your macros to run faster and better.

The code that I show you here is simple, fast, and easy to use, you just copy/paste it where you need it and comment it out when you are finished or remove it.

The snippets provided below are explained in detail in the video above.

Timer Start

Paste this into your macro where the timer should begin.

    ' Timer Start
    ' https://www.TeachExcel.com
    ' - Type Ctrl + G to see the Immediate Window, where the result of this
    '   will be output. (View > Immediate Window)
    Dim timerStart As Double
    timerStart = Timer

Timer End and Output

Paste this into your macro where the timer should end and the output generated.

This outputs to the Immediate Window (Ctrl + G | View > Immediate Window)

    ' Timer End
    ' https://www.TeachExcel.com
    Debug.Print vbNewLine & String(40, "*") & vbNewLine & _
                "Timer: " & Timer - timerStart & _
                vbNewLine & String(40, "*") & vbNewLine

Downloadable Files: Excel File

Question? Ask it in our Excel Forum


Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons 50+ Hours of Instruction 200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Tutorial Details
Downloadable Files: Excel File
Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course