首页 > 解决方案 > 如何将 worksheetfunction.large 与数组一起使用?

问题描述

我需要你的帮助.. :(

我想使用 worksheetfunction.large,其中输入数组是一个存储数组。但我根本无法让它工作.. :( 我一直收到错误说明:“无法获得 WorksheetFunction 类的大属性” - 很奇怪,因为我的数组语句是错误的。在我的新 MLArray 中,我有 1800 左右行,唯一的数字(小数)在 0 和 1 之间 - 我需要知道进入前 100 名的限制是什么 - 因此 .Large 函数..

谁能给我关于如何使用数组的提示,以便我可以在代码末尾获得 MLFixpoint 值..?

最好的问候/肯尼斯

Dim arr1 As Variant
Dim NewArray As Variant
Dim MLArray As Variant

'Arr1 is from another workbook with 100000 rows
arr1 = .Range("A1:BM" & tempUsedRangeRow).Value

'Here I select only the rows in my array, that has R62 as condition - and then the other workbook is closed, but my array is preserved
NewArray = ArrayRemoveRow(arr1, "aktafd", "R62", 3, True)

'Here I state the new onedimensional array, that I believe I have to use in my worksheet formula
ReDim MLArray(UBound(NewArray, 1))

'I run through the "newArray"
For ml = 1 To UBound(NewArray)
    MLArray(ml) = NewArray(ml, RykkerIndex)
Next ml
    
    
'As Excel formula
'MLfixpoint = Application.WorksheetFunction.Large("AU:AU", 100)
    
    
'My problem
'MLfixpoint = Application.WorksheetFunction.Large(MLArray(0), MLArray(allRows), DailyMLCapacity)

标签: excelvbaworksheet-function

解决方案


推荐阅读