WillR
Well-known Member
- Joined
- Feb 18, 2002
- Messages
- 1,143
I'm not too good with this sort of stuff, so any help would be greatly appreciated...
I have witten the follwing UDF
Function twoweekrate(balance)
If balance >= 0 And balance <= 5000 Then
twoweekrate = (balance * 0.04) / 365
Else
If balance > 5000 And balance <= 1000 Then
twoweekrate = (balance * 0.034) / 365
Else
If balance > 1000 And balance <= 25000 Then
twoweekrate = (balance * 0.032) / 365
Else
twoweekrate = (balance * 0.024) / 365
End If
End Function
However, when i try to use the formula in XL it gives Name? or Value! error msg...in VB, it says, "compile error: Block if without end if" i have an end if in the code, so what am i doing wrong??
Here's hoping.
Will.
I have witten the follwing UDF
Function twoweekrate(balance)
If balance >= 0 And balance <= 5000 Then
twoweekrate = (balance * 0.04) / 365
Else
If balance > 5000 And balance <= 1000 Then
twoweekrate = (balance * 0.034) / 365
Else
If balance > 1000 And balance <= 25000 Then
twoweekrate = (balance * 0.032) / 365
Else
twoweekrate = (balance * 0.024) / 365
End If
End Function
However, when i try to use the formula in XL it gives Name? or Value! error msg...in VB, it says, "compile error: Block if without end if" i have an end if in the code, so what am i doing wrong??
Here's hoping.
Will.