From: ker_01 on

I have a 3D array that is (1 to 2, 1 to 24, 1 to 12)
first parameter is raw number vs. %
second parameter is hour of the day
third parameter is 5-min increment (within each hour)

I'm taking LAN reports and scraping them to do some bandwidth analysis (I
don't have control over the source data). I've got the data populated into my
array, representing one data point every 5 minutes.

Now I want to run some basic statistics against my array, for example:
For hour 14, what was the average percent of all values within that hour?
Application.worksheetfunction.average(MyArray,1,14)

Based on my different (random) attempts at syntax, I always get an error
about the number of dimensions, or a type mismatch error. I'v tried various
combinations of commas, parans, etc, but no joy.

Can anyone help me with the syntax to get this first calculation? From that,
I should be able to deduce the syntax pattern and do all the rest.

Thank you,
Keith
From: Bob Umlas on
Well, one issue is that you dimmed the 3rd parameter from 1 to 12 yet are
referring to 14 in your function, which doesn't exist!
Bob Umlas

"ker_01" <ker01(a)discussions.microsoft.com> wrote in message
news:AB3D61C5-3293-429D-AC09-9DFA3A9C9000(a)microsoft.com...
>
> I have a 3D array that is (1 to 2, 1 to 24, 1 to 12)
> first parameter is raw number vs. %
> second parameter is hour of the day
> third parameter is 5-min increment (within each hour)
>
> I'm taking LAN reports and scraping them to do some bandwidth analysis (I
> don't have control over the source data). I've got the data populated into
> my
> array, representing one data point every 5 minutes.
>
> Now I want to run some basic statistics against my array, for example:
> For hour 14, what was the average percent of all values within that hour?
> Application.worksheetfunction.average(MyArray,1,14)
>
> Based on my different (random) attempts at syntax, I always get an error
> about the number of dimensions, or a type mismatch error. I'v tried
> various
> combinations of commas, parans, etc, but no joy.
>
> Can anyone help me with the syntax to get this first calculation? From
> that,
> I should be able to deduce the syntax pattern and do all the rest.
>
> Thank you,
> Keith