I have written an Excel function to sum the values from the cells surrounding a selected cell. For example if I want to sum the values found in the cells immediatly below my selection and then insert the value into the selected cell I enter my function into the selected cell as “=GroupSum(Row(),Column(), 1,0)”.
The function works when I first insert it, but subsequently when I change any of the values in the fields used by the calculation within the function, the resulting function value is not updated automatically.
I have tried adding the Worksheets(1).Calculate method to the SelectionChange event on this specific worksheet, but that seems to have no effect. My workaround for now is to enter all of my updated values into the spreadsheet first and then hit the CTRL-ALT-SHIFT-F9 keys and update all of the calculations on the worksheet at once. Is there any other way to get this value to update automatically? I don’t mind if all of the calculations on the page are updated at once. I just want something that will update the calculations without additional user intervention.