I've written a Function in VBA to return a certain value based on certain cells' values. I execute/run this function in a formula on a certain cell
=MyFunction() My problem is, the cells which have the above formula don't automatically update if the cells used in the function (in VBA) are changed.
How can I re-run or update or re-execute the above formula if the certain cells that are used are changed?
Application.Volatileto your UDF VBA code.Application.Volatileis that the cells that are changing are not in the same sheet where the function is used. All I needed to do was add a useless argument in the UDF for the range that needs to be tracked for any changed and it worked! Thanks!