Get Value module

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Question, I am using the following expression to return a value but I can't
seem to get it to work right. I want it to GetValue -4 for anything between
..1 and .15. Any suggestions

Function GetValue(ValueIn) As String
Select Case ValueIn
Case Is < 0.15, Is > 0.1
GetValue = -4
Case Is = 0.151 <> 0.2
GetValue = -8
Case Is > 0.21
GetValue = -12.5
End Select
End Function

Thanks
 
Try:

Function GetValue(ValueIn) As String
Select Case ValueIn
Case 0.1 To 0.15
GetValue = -4
Case 0.151 To 0.2
GetValue = -8
Case Is > 0.21
GetValue = -12.5
End Select
End Function

What do you want returned if ValueIn is less than .1? You might want a Case
Else in there to handle that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top