Hi
I have written the below function for which I would like to make the number of array arguments optional. In the current case it takes 5 arrays of equal length as argument, and combines them into the StockMatrix array.
How can I make the number of required arrays arbitrary, so that the function may also have worked if I called the function with 7 arrays: SMatrix_C(arr1, arr2, arr3, arr4, arr5, arr6, arr7). I don't know if it makes a difference, but the actual arrays I supply as arguments are worksheet ranges, so that an example call with five array arguments will look like =SMatrix_C(B2:B523;C2:C523;D2:D523;E2:E523;F2:F523)
The full function code is supplied below, however with a few calls to other functions; the below code is irrelevant, and only included for completeness.
Bookmarks