Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Function getValue(L As Double) As Double
If L >= 0 And L <= 5 Then
getValue = 0
ElseIf L >= 10 And L <= 20 Then
getValue = 0.15
ElseIf L >= 21 And L <= 40 Then
getValue = 0.3
ElseIf L >= 41 And L <= 60 Then
getValue = 0.5
ElseIf L >= 61 And L <= 80 Then
getValue = 0.7
ElseIf L < 0 And L >= -9 Then
getValue = 0
ElseIf L < -10 And L >= -20 Then
getValue = -0.15
ElseIf L < -21 And L >= -40 Then
getValue = -0.3
ElseIf L < -41 And L >= -60 Then
getValue = -0.5
ElseIf L < -61 And L >= -80 Then
getValue = -0.7
ElseIf L < -81 And L >= -99 Then
getValue = -0.8
Else
getValue = 0
End If
End Function
Function getValue(L As Double) As Double
If L >= 0 And L <= 0.05 Then
getValue = 0
ElseIf L >= 0.1 And L <= 0.2 Then
getValue = 0.15
ElseIf L >= 0.21 And L <= 0.4 Then
getValue = 0.3
ElseIf L >= 0.41 And L <= 0.6 Then
getValue = 0.5
ElseIf L >= 0.61 And L <= 0.8 Then
getValue = 0.7
ElseIf L < 0 And L >= -0.09 Then
getValue = 0
ElseIf L < -0.1 And L >= -0.2 Then
getValue = -0.15
ElseIf L < -0.21 And L >= -0.4 Then
getValue = -0.3
ElseIf L < -0.41 And L >= -0.6 Then
getValue = -0.5
ElseIf L < -0.61 And L >= -0.8 Then
getValue = -0.7
ElseIf L < -0.81 And L >= -0.99 Then
getValue = -0.8
Else
getValue = 0
End If
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.