ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referring to a certain column in an array (https://www.excelbanter.com/excel-programming/421719-referring-certain-column-array.html)

avi

Referring to a certain column in an array
 
Hello,

I have an array with 10 column and many rows

I want to perform an Excel function (as average) on a specific column

Is there a way to do it directly? I look for something as :

Application.Average(MyArray(*,6)) for the average of
column 6

Thanks for your help

Avi

JE McGimpsey

Referring to a certain column in an array
 
One way:

With Application.WorksheetFunction
Debug.Print .Average(.Index(MyArray,,6))
End With

In article
,
avi wrote:

Hello,

I have an array with 10 column and many rows

I want to perform an Excel function (as average) on a specific column

Is there a way to do it directly? I look for something as :

Application.Average(MyArray(*,6)) for the average of
column 6

Thanks for your help

Avi



All times are GMT +1. The time now is 09:55 AM.

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