I'm writing a user defined function and have it calculating properly.
I would like to have the variable requirements shown as the user is typing the formula like when you start typing "=if(" a yellow box appears below the formula bar with "IF(logical_test,[value if true],[value if false])"
How do I get that to appear for my UDF.
Thanks!
Paul
I would like to have the variable requirements shown as the user is typing the formula like when you start typing "=if(" a yellow box appears below the formula bar with "IF(logical_test,[value if true],[value if false])"
How do I get that to appear for my UDF.
Thanks!
Paul
Code:
Public Function ExpPlacement(Paybox As Range, Paygrade As Integer, _
Current_Years_Experience As Integer, Spread_Years As Integer)
Next_Years_Experience = 1 + Current_Years_Experience
If Current_Years_Experience + 1 >= Spread_Years Then
ExpPlacement = WorksheetFunction.VLookup(Paygrade, Paybox, 3, False)
Else
ExpPlacement = ((WorksheetFunction.VLookup(Paygrade, Paybox, 3, False) _
- WorksheetFunction.VLookup(Paygrade, Paybox, 2, False)) / Spread_Years _
* Next_Years_Experience) + WorksheetFunction.VLookup(Paygrade, Paybox, 2, False)
End If
End Function