none
nested UDFs calculation in Excel RRS feed

  • Question

  • I have an Excel AddIn, I provide two buttons 1. "Refresh Selected Cells" & 2. "Refresh Current worksheet", once users click button 2, Hopefully all functions on the current sheet will be re-calculated.
    In event handler for button 2, I use

    sheet.Calculate();

    It works fine except for nested UDFs Say, I have cell A1, UDF1(..), Cell B1 UDF2(A1,...) If I select cell B1 and click button 1, then I get the expected result. But if I click Button 2, Cell B1 get incorrect result.

    How to make sure the calculation of nested UDFs correct?

    Thanks


    Peace & Joy

    Thursday, August 13, 2015 8:12 PM

All replies

  • According to your description, I have made a sample to try to reproduce your issue, unfortunately, ​based on the test, nested UDFs works well for our side when I use worksheet.Calculate.

    Could you provide more detailed information and full sample (codes, screen shots)? That will help us reproduce and resolve your issue.

    Tuesday, August 18, 2015 8:46 AM