To create this Function, execute the following steps
Use the Application.Volatile True statement in Excel VBA function code lines to force the formula to recalculate, Insert the below code in a New Module.
In This the code line Application Volatile True forces the function to recalculate every time the cell or range value changes, the new UDF (User Defined Function) with name Qtravg recalculate’s every time.
In Cell F2 Type
= Qtravg()
2. Use Excel sheet options