Referring to a certain column in an array

A

avi

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
 
J

JE McGimpsey

One way:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top