I have a 2d array, with flexible dimensions:
arr_emissions(1 to n, 0 to m)
Where n
is 22 or larger, and m
is 6 or larger.
In the smallest case column m = 6
should contain the sum of columns m = 2 - 5
.
I could ofcourse simply add them, but as the dimensions of the array are flexible I would like to implement a more robust method, that preferly doesn't loop over the entire array.
I was hoping to implement the native application.WorksheetFormula.Sum()
. I saw an implementation in this answer, but that only works for complete rows or columns.
Example:
I have arr_emissions(0 to 111,1 to 6)
. It is populated in a loop from 1 to 111.
The data in the array is as follows:
(1,1) #3-4-2020# 'a date value
(1,2) 1,379777
(1,3) 0
(1,4) Empty
(1,5) Empty