WillR
Well-known Member
- Joined
- Feb 18, 2002
- Messages
- 1,143
I have the following UDF code in VB
Function SpecialInterest(account, balance)
'this looks up the relevant special rate from the extract
'and works out the daily interest P&L contribution
Rate = WorksheetFunction.VLookup(account, Special_Table, 18, False)
SpecialInterest = (balance * (Rate / -100)) / 365
End Function
I getting the following error msg
'Function call on LHS of assignment must
return variant or object'
The data i'm lookin up is in col 18 of special_table so what's the problem...?
Can anyone shed any light on this for me please...
Will.
Function SpecialInterest(account, balance)
'this looks up the relevant special rate from the extract
'and works out the daily interest P&L contribution
Rate = WorksheetFunction.VLookup(account, Special_Table, 18, False)
SpecialInterest = (balance * (Rate / -100)) / 365
End Function
I getting the following error msg
'Function call on LHS of assignment must
return variant or object'
The data i'm lookin up is in col 18 of special_table so what's the problem...?
Can anyone shed any light on this for me please...
Will.