Validate entry based on another cell value

D

Dearoledad

How do I set up validation of data entry in cell B1 depending on the value
entered in cell A1? Valid entries for B1 are - blank if A1 < 1 or N or E if
column A1 > zero.
 
T

T. Valko

One thing to note, you can't force a user to either leave a cell empty or
enter something. There are little things you can do to try to coax them to
follow those rules but in the end the user has all the power. ( the ON/OFF
switch!)

So, try this:

Select cell B1
Goto the menu Data>Validation
Allow>Custom
Formula:

=AND(COUNT(A1),A1>0,OR(B1="N",B1="E"))

Uncheck the "Ignore blank" checkbox.
If you want custom messages to appear select the Input Message and/or Error
Alert tabs and fill in the info.
OK out
 
T

T. Valko

One thing to note, you can't force a user to either leave a cell empty or
enter something. There are little things you can do to try to coax them to
follow those rules but in the end the user has all the power. ( the ON/OFF
switch!)

So, try this:

Select cell B1
Goto the menu Data>Validation
Allow>Custom
Formula:

=AND(COUNT(A1),A1>0,OR(B1="N",B1="E"))

Uncheck the "Ignore blank" checkbox.
If you want custom messages to appear select the Input Message and/or Error
Alert tabs and fill in the info.
OK out
 
D

Dearoledad

Thanks, Biff. It worked perfectly. As for a user not entering anything, I
have devised a gorella that reaches out of the screen and shakes the user if
they skip the field when they should be entering data.

Thanks again.
 
D

Dearoledad

Thanks, Biff. It worked perfectly. As for a user not entering anything, I
have devised a gorella that reaches out of the screen and shakes the user if
they skip the field when they should be entering data.

Thanks again.
 
T

T. Valko

a gorella that reaches out of the screen and shakes the user

I like that idea!

Thanks for the feedback!
 
T

T. Valko

a gorella that reaches out of the screen and shakes the user

I like that idea!

Thanks for the feedback!
 

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