I got a compile error for Excel 2010 VBA function implementation for a deposit computing. I want to return an array with interest rate and its value for the given deposit.
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
End Function
It returns #VALUE! .
What is wrong with it ?
Thanks
Dim v:v=exe3djxInterestSelect(100)Run it by pressing F5 with the cursor in the sub.