How to measure Excel computing speed?

I am developing an Excel 2010 application that contains complex calculations in over 60+ worksheets . When I change certain data in any cell, it takes a lot of time in the background (I want the calculation to be automatic ) .....

  • Is there a way to find out which formula takes more time over another?
  • What is the best approach to improving productivity - a few simple formulas compared to one complex formula (MULTISTEP) ?

those.
[STEP-1] E1 = C1 * D1
[STEP-2] F1 = E1 / B1
[STEP-3] G1 = F1 + B1

OR

[SINGLE STEP] G1 = (C1 * D1 / B1) + A1

The offer will be appreciated!
Thanks

+4
source share
2 answers

As for the second part, if you use the usual non-volatile functions, then a few simple formulas may be better for two reasons:

  • With simple recounts (without restoring dependency trees), Excel will only calculate those parts that have actually been changed, for example. in the one-step example, if the value in A1 changes, Excel will have to recalculate the expression in parentheses (C1 * D1 / B1) , even if the values โ€‹โ€‹of C1, D1, B1 do not change. When you replace this part with a reference to F1, the value of F1 will not be recalculated unless A1 changes its value.
  • A few simple formulas can be better calculated in parallel if you have multiple cores.

another useful link in addition to MSDN: http://www.decisionmodels.com/calcsecretsc.htm

Volatile functions are evil in very large books, especially OFFSET and INDIRECT. All of them are recounted every time something changes in the file, and they are always calculated in one thread. Any cell that depends on a cell with a volatile function also becomes volatile, since all dependencies must be recalculated every time a mutable function is recalculated. This viral volatility in a large file can seriously affect performance. Using many simple formulas also helps in this case, since many dependencies can remain unstable.

From the above link:

Some Excel functions do not use multi-threaded calculations, for example:

Calculation of a data table (but structured table references use MTC). Custom functions (but XLL functions may be multi-threaded). Xlm. INDIRECT CELLS that use either format2 or address parameters. GETPIVOTDATA and other functions related to pivot tables or cubes. Range.Calculate and Range.CalculateRowMajorOrder. Cells in circular support cycles.

Once I inherited a large file, which in 30 minutes counted on a dedicated fast machine, and this was due to the crazy use of OFFSET to access data from a large sheet. By simply moving the calculation logic from Excel to Access and importing the results using a pivot table, I reduced the total calculation time to a few seconds!

+3
source

This may help with your first question http://msdn.microsoft.com/en-us/library/ff700515%28v=office.14%29.aspx , although as you can see, your question may be close to being off topic because it is required to answer it comprehensively. For your second question, I would suggest that "there are no distinguishable differences."

+1
source

Source: https://habr.com/ru/post/1496655/


All Articles