I defined a few functions in a workbook using VBA, and then expected to be able to use them in a cell formula - but Excel does not recognise the function. I just get #NAME?<
I opened Excel, opened the code editor (Alt+F11), selected the new workbook, inserted a new Module, typed
Function Decrement(i As Integer) As Integer
Decrement = i - 1
End Function
then went back to my workbook and in A1 typed =Decrement(2) and hit Enter, and it worked. Decrement showed up in the drop-down list of functions as I typed =Decr... It was recognized, and it worked. I didn't even have to save the workbook.
I know this isn't exactly an answer to your question, but it's the recipe I had luck with.