Capture.JPGOption Explicit Function Something(Conditions As String, Title2 As Double, Title3 As Double) As Variant Something = CVErr(xlErrNA) On Error GoTo NiceExit Select Case LCase(Conditions) Case "excellent", "very good", "good" Something = Round(Title3 - Title2, 2) + Round(3.25 * Title2, 2) + Round(Title3 - Title2, 2) * 1.95 Case Else Something = Round(Title3, 2) + Round(3.25 * Title2, 2) + Round(Title3, 2) * 1.95 + 300 End Select Exit Function NiceExit: End Function