I don't understand the problem you're having. It should be entered as an ordinary formula in a cell. Post a workbook?

The Application.Volatile causes the function to calculate when anything changes. It might be changed to reduce the impact.