Validation

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
 
G

Guest

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
 

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

Similar Threads

Excel Assistance with Fomula 0
Data Validation 4
A data validation question 1
dynamic vlookup then sum 3
Data Validation - Complex Q 2
Manipulate textfile with VBA 3
Data Validation blanks for formulas 18
Validate Cell 1

Top