简体   繁体   中英

Calculate execution time of Excel Spreadsheet calculations?

Is it possible to calculate the execution of excel functions? Eg how long does it take to sum 30 rows?

My company has coding challenges and we're thinking about adding in execution time of your solution as a metric/bonus points, but one of the business folk does all of them in excel (and he's rather good at it) and I can't find a way to time the execution.

Any ideas?

I have looked into this as I have rather large calculations in Excel. The software I have used, which is free to use (just copy from the link below) has been flexible enough for me. You could for instance use the "Range Timer" to clock your cell summing 30 others. Here are some profiling tips on microsofts site together with the code.

You haven't provided much to go on but a rudimentary stopwatch accurate to the millisecond can be achieved with Timer.

application.calculation = xlcalculationmanual
with range("a31")
    debug.print timer
    .formula = "=sum(a1:a30)"
    .calculate
    debug.print timer
end with
application.calculation = xlcalculationautomatic

Subtract the first Timer from the second or possibly record the first as a double and make the subtraction part of the procedure.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM