|
楼主 |
发表于 2024-6-18 15:01
|
显示全部楼层
本帖最后由 lookcd 于 2024-6-18 15:29 编辑
大侠回复的没有问题,大侠的方法是直接调用vba函数,
俺想问的是直接调用excel内置函数的写法为何没有成功?调用take和drop函数
Function OFFSETARRAY(rng As Range, rows As Integer, columns As Integer, height As Integer, width As Integer) As Range
Dim x1 As Range, x2 As Range
Application.Volatile
With Application '可以调用excel内置函数
set x1 = .TAKE(.Drop(rng, rows), height)
set x2 = .TAKE(.Drop(x1, 0, columns), , width)
set OFFSETARRAY = x2
End With
End Function
还是因为当前365版本内置的vba不支持调用take和drop函数?
|
|