对于存款计算,我收到了 Excel 2010 VBA 函数实现的编译错误。我想返回一个数组,其中包含给定存款的利率及其值。
Function exe3djxInterestSelect(deposite)
Dim V() As Variant
ReDim V(1, 2)
Select Case deposite
Case Is < 0
exe3djxInterestSelect = CVErr(xlErrNum)
Case 0 To 1000
V(1) = 0.055
V(2) = deposite * 0.055
exe3djxInterestSelect = V
Case 1000 To 10000
V(1) = 0.063
V(2) = deposite * 0.063
exe3djxInterestSelect = V
Case 10000 To 100000
V(1) = 0.073
V(2) = deposite * 0.073
exe3djxInterestSelect = V
Case Else
V(1) = 0.078
V(2) = deposite * 0.078
exe3djxInterestSelect = V
End Select
结束功能
它返回#VALUE!.
它有什么问题?
谢谢