global array would seem to be the solution...your title suggests the solution.
I haven't used them, but they're like any other variable that you will be accessing through a formula.
In the group header (usually) you will reset the array...
for an array redim will reinitialize the array.
you will need to increment it, and in this case access it at the same time.
redim preserve will all you to grow the array...if you have a limit that is large enough, you can skip this step (say you dim the array to be 20 and you will only get 10...no need to redim preserve as it will only slow the machine down...all sorts of redim preserver strategies--grow by 10 for example) but I digress. Once you have the array member, you assign it a value from your data. Depending on how the formulas work, you may want a counter so you know what line you're on to access the correct array member(s) and add it to the value that is displayed.
I know general, CR help is available for most of this, vb6 will help as well as most of the syntax is from vb6.
Last proviso, CR arrays are only 1 dimension, so if you need to store more than 1 piece of information, either store it as a delimited string in 1 array or have multiple arrays running at the same time all index the same.
HTH