Log in

View Full Version : Check to see if number falls within a range



clhare
11-01-2011, 02:34 PM
I have a userform that includes a text box for a number value which can have 2 decimal places. I need to then check to see if that value falls somewhere between 95.00 and 105.00. What kind of variable would the number on the userform need to be and how do I figure out if the number entered on the userform falls in that range?

macropod
11-01-2011, 05:22 PM
Hi Cheryl,

You could use something along the lines of:
If Abs(100 - TextBox1.Text) <= 5 Then MsgBox "!"