Trying to return a L, M, H value based on the values of two inputs. Here is what I have:
If (80 <= x <= 120 And y > 120) Or (x > 120 And y > 120) Or (x > 120 And 80 <= y <= 120) Then
CDI = "H"
ElseIf (x < 80 And y <= 120) Or (x < 120 And y < 80) Then
CDI = "L"
ElseIf (x < 80 And y > 120) Or (80 <= x <= 120 And 80 <= y <= 120) Or (x > 120 And y < 80) Then
CDI = "M"
End If
The values being returned aren't what I need. For example, (0,291) returns H when it should clearly be M. Why?