Data Validation on Numbers

R

ringo tan

How do I restraint the user from entering odd numbers in the cell, that means
only allow even numbers but these even numbers must be in multiples of 5?

Example : 10,20,30,40................

Thank you.



Regards,
Ringo Tan
 
L

Leo Heuser

Ringo Tan

One way:

Choose "Custom" (or similar) in the validation box
and enter this formula

=(A1>0)*(MOD(A1,10)=0)

if negative numbers are also allowed, use

=(A1<>0)*(MOD(A1,10)=0)

if both negative numbers and zero are allowed:

=MOD(A1,10)=0
 

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

Top