I'm trying to define the following function but am getting Compile Error: Sub or Function not defined. The debugged is highlighting the first line. Any ideas as to what could be incorrect here?
Function MAXELSEMIN(A As Integer, B As Double, C As Double) As Double
If A = 1 Then
test = Max(B, C)
ElseIf A = -1 Then
test = Min(B, C)
Else
test = 0
End If
End Function