I have a custom function that determines in a value is between two numbers.
My problem is when a field is blank it throws an error.
How can I handle this?
My problem is when a field is blank it throws an error.
How can I handle this?
Code:
'Call Weight
Public Function Call_Weight(ByVal scoreVal As Double)
If scoreVal >= 0.85 Then x = 10
If scoreVal <= 0.849 And scoreVal >= 0.8 Then x = 9
If scoreVal <= 0.799 And scoreVal >= 0.75 Then x = 8
If scoreVal <= 0.749 And scoreVal >= 0.7 Then x = 7
If scoreVal <= 0.699 And scoreVal >= 0.65 Then x = 6
If scoreVal <= 0.649 And scoreVal >= 0.6 Then x = 5
If scoreVal <= 0.599 And scoreVal >= 0.55 Then x = 4
If scoreVal <= 0.549 And scoreVal >= 0.5 Then x = 3
If scoreVal <= 0.499 And scoreVal >= 0.45 Then x = 2
If scoreVal <= 0.449 And scoreVal >= 0.4 Then x = 1
If scoreVal <= 0.399 Then x = 0
Call_Weight = x
End Function