User Defined Functions NOT recalculating

后端 未结 11 2038
渐次进展
渐次进展 2020-12-15 20:27

I recently took a large, stable XLSM file, and split it apart into an XLAM and XLSX. Thousands of cells in the XLSX call (udfs) functions in the XLAM, and each such udf beg

相关标签:
11条回答
  • 2020-12-15 20:58

    Press CTRL+ALT+SHIFT+F9

    This may recalc more than wanted, but it updated my UDF.

    (Source)

    0 讨论(0)
  • 2020-12-15 21:03

    Excel will monitor the range mentioned in the formula for any change, I faced this today and I was thinking and realized that. So to fix it, make a dummy argument in your function which takes the range you want to monitor or create a dummy function. In my case I called it monitorRange which returns nothing

    Function monitorRange(rng As Range)
    End Function
    

    and I mentioned it in my formula example

    =myfunction(a,b) & monitorRange(RANGE_TO_MONITOR)
    

    This worked very well and it should work with any other function

    0 讨论(0)
  • 2020-12-15 21:03

    I was having the same issue...I found (in another post) that adding Application.Volatile to the function code made it calculate with the spreadsheet (f9)

    0 讨论(0)
  • 2020-12-15 21:05

    My screen shot:

    I had the same problem. Find and Replace works, but not very nice. My solution is:

    go to Data tab > Edit links > Click Open Source will resolve this

    0 讨论(0)
  • 2020-12-15 21:10

    You can force recalculation in this situation by search and replace on the = which is at the start of all formulae. You can also make this into a macro and map it to a key combination.

    Edited to add

    See the macro Greg Glynn has in his answer.

    0 讨论(0)
  • 2020-12-15 21:12

    For UDFs who can access to Application instance could use:

    Application.CalculateFull()
    

    MSDN source here

    0 讨论(0)
提交回复
热议问题