ユーザー定義関数の範囲引数は、Variant型として処理される場合のみ、最高速モードと互換性があります。たとえば、=MyFunc(A1:E4, 5, 4)としてワークシートに呼び出される関数の場合:
Function MyFunc (MyData As Variant, Rows As Long, Cols As Long) As Double
For I = 1 to Rows
For J = 1 to Cols
MsgBox MyData(I, J) 'or otherwise work with the cell range as an array
Next J
Next I
End Function