Forum Discussion

mikhanx1's avatar
mikhanx1
Copper Contributor
Jan 21, 2022

Description of Excel VBA function

Hi,
Can anyone please tell me how can we assign description to excel VBA function? For example when we type Average it shows it's description as shown in figure below. I want to do the same with my custom VBA function. Thanks.

5 Replies

  • mikhanx1 

    Not exactly what you asked, but:

    Let's say you create a UDF named MyFunc

    Type =MyFunc( and then press Ctrl+Shift+A.

    Result:

    You can double-click an argument and then enter something or point to a range.

    • mtarler's avatar
      mtarler
      Silver Contributor
      Wish I could give you more than 1 Like, I never knew this trick!!! TY. unfortunately, since I generally don't use UDFs, I'll probably forget about it then next time it would help 😞
  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    mikhanx1 

    here is a link with an average example

    Average in VBA in Excel

     

    Dim myRange as Range
    
    'Loop code here
    Set myRange = Range("L" & i & ":L" & k)
    Cells(j, 20).Value = Application.WorksheetFunction.Average(myRange)

     

     

    Hope I was able to help you with this info.

     

    NikolinoDE

    I know I don't know anything (Socrates)

     

Resources