hello all,
I've read the previous thread with the same problem but it doesn't seem to apply to my case.
I'm trying to do 3 types of average option valuation but will not burden you with the details.
Code seems to be breaking at the bolded line.
Any suggestions to what I should look at are very appreciated!
I've read the previous thread with the same problem but it doesn't seem to apply to my case.
I'm trying to do 3 types of average option valuation but will not burden you with the details.
Code seems to be breaking at the bolded line.
Any suggestions to what I should look at are very appreciated!
Function meth_exec() As Long
Dim comp As String: comp = Cells(18, 6).Value
Dim Av As String: Av = Cells(19, 6).Value
Dim meth As String: meth = Cells(20, 6).Value
If comp = "CN" And Av = "G" And meth = "E" Then meth_exec = 1
ElseIf comp = "DS" And Av = "A" And meth = "MC" Then meth_exec = 2
ElseIf comp = "DS" And Av = "G" And meth = "MC" Then meth_exec = 3
Else: Call not_sup
End If
End Function
Dim comp As String: comp = Cells(18, 6).Value
Dim Av As String: Av = Cells(19, 6).Value
Dim meth As String: meth = Cells(20, 6).Value
If comp = "CN" And Av = "G" And meth = "E" Then meth_exec = 1
ElseIf comp = "DS" And Av = "A" And meth = "MC" Then meth_exec = 2
ElseIf comp = "DS" And Av = "G" And meth = "MC" Then meth_exec = 3
Else: Call not_sup
End If
End Function