If the input parameters to your custom function are not changing, and there are no triggers set up for the function, then it is likely that the function is being triggered by changes in other parts of the spreadsheet. Custom functions in Google Sheets are designed to automatically recalculate whenever there are changes in the spreadsheet that affect their input parameters or their output values.
For example, if you have a custom function that takes a cell range as an input parameter, and the values in that cell range are changed by another formula or by user input, then the custom function will be triggered to recalculate. Similarly, if the custom function returns a value that is used by another formula in the spreadsheet, then the custom function will be triggered whenever the other formula is recalculated.
To determine what is triggering the custom function, you can use the following steps:
- Open the Google Sheets spreadsheet that contains the custom function.
- Select the cell or cells that contain the custom function.
- In the toolbar at the top of the screen, click on the "Formulas" tab.
- In the "Formulas" tab, click on the "Tracing" button.
- In the "Tracing" panel, click on the "Precedents" tab to see a list of all the cells and formulas that are affecting the custom function.
This will show you all of the cells and formulas that are triggering the custom function to recalculate. If you see any unexpected cells or formulas in the list, you can investigate further to determine the cause of the unexpected recalculations.
Alternatively, you can also use the "Evaluation Order" tab in the "Tracing" panel to see the order in which the custom function and other formulas in the spreadsheet are being evaluated. This can help you identify any potential problems with the calculation order that may be causing the custom function to be triggered unexpectedly.