exceloffice-jsoffice-addinscustom-functions-excelexcel-web-addins

Excel Refreshes whole sheet even when a single cell is changed


I am working on an Excel Add-in and have created some custom functions in it. Now my user has created some functions (150+ custom functions) and all of these custom functions have parameters as references to other cells in sheet. When user updates some text cell (whether referred in some function call or not) , whole sheet is refreshed and Excel shows busy in all cells having custom functions it. I understand that if a cell is referred in some custom function and it is updated, that custom function is called to show updated data, but it should not happen when user edits a cell not referred in any of the functions.

I cannot change sheet calculation mode to manual as it will stop updating other cells which are changed by user. Also If I change calculation mode to Manual and on changing it back to Auto again refreshes whole sheet, so setting it to manual has drawbacks without gaining anything in my case.


Solution

  • Is it possible that your UDFs use volatile formulas such as NOW,TODAY,RANDBETWEEN, OFFSET, INDIRECT, INFO, SUMIF, RAND or you declared your UDFs to be volatile? In this case functions are recalculated if changes in any cells are made. For example if you fill hundred thousand lines with RAND it takes few seconds to recalculate after entering any value to a blank cell.

    More on volatile formulas: Volatile values in functions

    More on volatile formulas in UDFs: Excel Recalculation