By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,771 Members | 1,669 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,771 IT Pros & Developers. It's quick & easy.

Accessing Individual Rows/columns From An Array In Vba

P: 1
Hi there,

i need some help in accessing a the ith row in a NxM array in vba. More specifically i have an NxM array called prices and i want to find the average of each row ,as well as the mean and standard deviation of each column.

Any hints ?i try using this code which sums the elements in the row and divideds it by the number of columns but it does not work when finding the stdev.

For i = 0 To NumOfYears - 1
For j = 0 To NumOfMonths - 1
YearlySum = YearlySum + Prices(i, j)
Next j
YearlyAverage(i) = YearlySum / NumOfMonths
YearlySum = 0
Next i
May 16 '07 #1
Share this Question
Share on Google+
1 Reply


Expert 5K+
P: 8,434
I'm not sure I understand the question. Are you saying that you want, for example, an average for January across all the years?
May 17 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.