Hey community,
I have following code / i wanna know how many seconds it takes this macro to run.
How can add following code to my VBA?
I am getting sub error
I have following code / i wanna know how many seconds it takes this macro to run.
Code:
Sub Brn()
Dim Markets As Worksheet
Set Markets = Sheets("sheet4")
Sheets("DATA").Range("A:A").Name = "run"
Sheets("DATA").Range("L:L").Name = "aris"
Sheets("DATA").Range("M:M").Name = "inted"
Sheets("DATA").Range("E:E").Name = "steri"
Sheets("sheet4").Range("AP:AP").Name = "byi"
Markets.Range("e1:e10").Name = "MRET"
With Sheets("DATA").Cells(5, "w")
.FormulaArray = "=sum(if((isnumber(match(run,mret,0)))*(aris>0)*(run<>"""")*(not(isnumber(match(steri,byi,0)))),printed))"
.Value = .Value
End With
End Sub
How can add following code to my VBA?
Code:
[COLOR=#00007F][FONT="]Sub[/FONT][/COLOR][COLOR=#403F41][FONT="] CalculateRunTime_Seconds()[/FONT][/COLOR]
[COLOR=#00007F][FONT="]Dim[/FONT][/COLOR][COLOR=#403F41][FONT="] StartTime [/FONT][/COLOR][COLOR=#00007F][FONT="]As[/FONT][/COLOR][COLOR=#403F41][FONT="] [/FONT][/COLOR][COLOR=#00007F][FONT="]Double[/FONT][/COLOR]
[COLOR=#00007F][FONT="]Dim[/FONT][/COLOR][COLOR=#403F41][FONT="] SecondsElapsed [/FONT][/COLOR][COLOR=#00007F][FONT="]As[/FONT][/COLOR][COLOR=#403F41][FONT="] [/FONT][/COLOR][COLOR=#00007F][FONT="]Double[/FONT][/COLOR]
[COLOR=#403F41][FONT="] StartTime = Timer[/FONT][/COLOR]
[COLOR=#007F00][FONT="]'*****************************[/FONT][/COLOR]
[COLOR=#007F00][FONT="]'Insert Your Code Here...[/FONT][/COLOR]
[COLOR=#007F00][FONT="]'*****************************[/FONT][/COLOR]
[COLOR=#403F41][FONT="] SecondsElapsed = Round(Timer - StartTime, 2)[/FONT][/COLOR]
[COLOR=#403F41][FONT="] MsgBox "This code ran successfully in " & SecondsElapsed & " seconds", vbInformation[/FONT][/COLOR]
[COLOR=#00007F][FONT="]End[/FONT][/COLOR][COLOR=#403F41][FONT="] [/FONT][/COLOR][COLOR=#00007F][FONT="]Sub[/FONT][/COLOR]
I am getting sub error