Validation

  • Thread starter Thread starter Guye
  • Start date Start date
G

Guye

hi all,
one more short question.
i need to creat on certain columns on a worksheet the following
validation.
the number should be between 0-1000, in case that the nuber is above
500 a message will appear with a certain warning, but the cell will
not be blocked and the value above 500 will be entered as usual.
thanks a lot
 
You can use a worksheet changge function such as the one below. You need to
add all the columns you need to be validated. I assume you had a validation
already set for 1 - 1000. You could eliminate the validation and make all
your checks in the worksheet change


Sub worksheet_change(ByVal Target As Range)

If Target.Column = 1 Then

If (Target > 500) And (Target <= 1000) Then

MsgBox ("Value needs to be between 1 and 1000")

End If
End If

End Sub
 
Back
Top