Lets say you have a function like this:
Function MyFunc(MyValue As Variant, MyRange As Range, MyColumn As Long) ' code goes here ... ... End Function
- 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:
- 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: