Function MyFunc(MyValue As Variant, MyRange As Range, MyColumn As Long) ' code goes here ... ... End Function 1)
When you type =MyFunc and press Tab, Excel will show =MyFunc(
If you then press Ctrl+Shift+A, Excel will enter the names of the arguments:
2) You can provide a description of the function and its arguments that will be used in the function wizard:
Sub RegisterFunction()
Application.MacroOptions _
Macro:="MyFunc", _
Description:="Looks up a value in a range", _
Category:="My UDF Category", _
ArgumentDescriptions:=Array( _
"is the value you're looking for", _
"is the lookup range", _
"is the column index of the return value")
End Sub
Result when you invoke the function wizard fx: