I use the follow code in Excel VBA:
If ((B - A) > 180) Then
result = 1
ElseIf ((B - A) < -180) Then
result = 2
Else
result = 0
End If
In case (B - A) = 180, VBA returns result = 1. The debugger shows the first statement of the If as True even if (B - A) = 180
Is it VBA acting funny or more probably me missing something?
Any help will be much appreciated.