Per forum rules, you should wrap your function code in code tags. The forum rules button at the top of the page will explain how to if needed.
The #Value error indicates a significant failure in the process of calling the function. In particular, the code calls for three arguments to the function, but the function call (with the mismatched parantheses and all) is only sending one argument to the function. This will prevent the function from executing and will trigger the value error. The function call needs to look like specialfunctionx(g12:g45,g46,0).
I don't see a simple Find/Replace being able to do make this kind of substitution, because each find/replace will need to replace the entire text of the function. It will not work to simply replace a part of the function text.
In many ways, I don't see a UDF being all that useful for this kind of thing. What is your reason for wanting to incorporate the UDF into these spreadsheets?
Bookmarks