Saturday, February 5, 2011

Excel Array Formula Series 12: MMULT function Matrix Algebra

Tuesday, February 1, 2011

Time my macro

Want a quick way to time your macro or demonstrate to your user how fast your macro runs?  Here is a quick code that will pop up a message box displaying the time it took!

Sub Time()
Dim Start As Long, Ending As Long, Time As Long
    Start = Timer()
        'insert macro here
    Ending = Timer()
    Time = Ending - Start
    MsgBox "Time lapsed: " & Format(Time / 60, "###.00") & " minutes or " & Time & " seconds"
End Sub

Excel Array Formula Series #8: FREQUENCY function