Do not allow negative numbers in cell

J

JNW

How can I restrict entry of positive numbers in a cell using data validation?
In other words I want only to be able to enter numbers that are less than 0.

Thanks.
 
J

JNW

Hey-

I found it. Select custom and if I am validating C3 the formula needs to be
=and(c3<0,isnumber(c3))
 
R

ryguy7272

Hope this helps...


Sub DelZeros()
For X = 1 To 1
Dim redRng As Range
Set redRng = Range("A1", Range("A100").End(xlUp))
For Each Cell In redRng
If Cell.Value <= 0 Then
Cell.Value = 0
End If
Next Cell
Next X
End Sub
 
Top