Hi,
I am using the below UDF to retain old value when if condition is false.
Formula I am using is :
=IF(AND(C9="Short",C10="Call",C11=9600),INDEX(OptionChain,MATCH(C11,OptionChain[Strike Price],0),9),CurrentValue())
Code of CurrentValue() is :
Function CurrentValue() As Variant
CurrentValue = Application.Caller.Value
If Val(CurrentValue) Then
CurrentValue = Val(CurrentValue)
ElseIf IsNumeric(CurrentValue) Then
CurrentValue = Val(CurrentValue)
End If
End Function
When IF statement condition is met, cell changes as per index search value but when condition is not met, value remains unchanged but I am getting message circular reference error.
Kindly help me correct my UDF. Thanks in advance
Rgds,
Dhruv
Bookmarks