Hi, below is the first line of the function. Based on comments from Aflatoon, I am assuming this is declared as a variant?
[VBA]Function PCA(VarRange As Range, Optional IncludeAddStats As Boolean = True) As Variant[/VBA]
Mdmackilliop, thanks for the example but do not fully understand how to utalise. For example, where would I specify the actual ranges to read in?, i.e the line:
acolumns = Array(Sheet2.Range("C2:C121"), Sheet2.Range("D2
121"), other.Range("K2:K121")).
Presumably if I have 120 rows in the data then I would need to set ReDim arr(120, 3), where 3 relates to 3 columns of data (not sheets)?
Thanks,
Hamond