ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using Excel Worksheet functions in Arrays (https://www.excelbanter.com/excel-programming/320674-using-excel-worksheet-functions-arrays.html)

The Roon

Using Excel Worksheet functions in Arrays
 
I have populated a multidimensional array, part of which is exampled as
follows:

JAN05 Q105 45.3 12.5 16.6 88.9 etc
FEB05 Q105 55.6 23.6 58.4 65.2
MAR05 Q105 25.7 36.5 98.5 45.7
APR05 Q205 98.4 25.7 23.9 59.7
MAY05 Q205 39.5 56.8 89.2 25.7
etc

I want to be able find and average all numbers in a particular column that
match a designation in Column 2, eg Q105, in the array. This array is not
populated in a worksheet, and nor do I want it to be.

I can do this by looping through every row in the array for a specific
column, but the array is 150 rows by 20 columns but it seems a cumbersome
approach.

Can I do this using the Dbase Worksheet functions that can be used in VBA ?

Advice appreciated.



Tushar Mehta

Using Excel Worksheet functions in Arrays
 
150 x 20 is a tiny matrix. If you know how to loop through it just do
so.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I have populated a multidimensional array, part of which is exampled as
follows:

JAN05 Q105 45.3 12.5 16.6 88.9 etc
FEB05 Q105 55.6 23.6 58.4 65.2
MAR05 Q105 25.7 36.5 98.5 45.7
APR05 Q205 98.4 25.7 23.9 59.7
MAY05 Q205 39.5 56.8 89.2 25.7
etc

I want to be able find and average all numbers in a particular column that
match a designation in Column 2, eg Q105, in the array. This array is not
populated in a worksheet, and nor do I want it to be.

I can do this by looping through every row in the array for a specific
column, but the array is 150 rows by 20 columns but it seems a cumbersome
approach.

Can I do this using the Dbase Worksheet functions that can be used in VBA ?

Advice appreciated.





All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com