function that returns array excel vba
If youâre familiar with array formulas, youâll be happy to know that you can create VBA functions that return an array. Returning an array of month names. Letâs start out with a simple example. The MonthNames function returns a 12-element array of â you guessed it â month names.