Hello. I want to make a custom function in Excel VBA which takes an array as an argument. The calculation I want performed, for example, is:
=SUMIFS(C16:C22,A16:A22,"<"&H3+4,E16:E22,"=1")/4
In the above example, I'd like to just pass the array A16:E22 rather than three separate columns (i.e. A16:A22, C16:C22, and E16:E22). I need to perform the calculation multiple times and pass different size arrays (always 5 columns wide from A to E, but varying in height with a different start and end row).
Calling the function from the Excel formula bar might look something like this:
=CUSTOM_FUNCTION(A16:E22, H3, 1)/4
Thanks