Prohibit Entering Data into a Cell

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

I need your help in figuring out how to prohibit a user
from entering data into a cell. I can not lock the cell
because in some cases data should be entered.

Example:

If the letter "H" is entered in column 1,cell 1 - then
the user should not be allowed to enter anything into
column 2, cell 1.
On the other hand, if column 1, cell 1 is blank - then
the user should be allowed to enter whatever is needed in
column 2, cell 1.

How do I achieve this. Can I use data validation? How?

Thanks for the help.

Matt
 
Hi Matt

in column 2 use data validation. Select the user defined option and
enter
=A1<>"H"
assuming that a1 is your cell 1

One remark. If a user first enters cell 2 a later change of cell1 to
'H' will not create an error
Frank
 
Hi Matt,

Use data validation. In the Allow dropdown select Custom
and in the Formula box enter:

=A1<>"H"

Biff
 
-----Original Message-----
Hi Matt
Thank you for the help. Once again I have been given a
solution that is so simple, yet the problem tied me up
for hours. I appreciate your advice.

Matt
 
Hi Frank,

I tried the formula you shown...but it seems like it is working th
other way round.....in another, if H is in cell A1, then no data can b
entered into cell B1....

I think the correct way is to choose Text Length as validatio
factor...

Allow :
Text Length

Data :
Greater Than

Minimum:
=A1=1

Then, if A1 is enter with anything, then Excel will prevent data bein
entered in cell B1
 
Hi Frank,

I tried the formula you shown...but it seems like it is working th
other way round.....in another, if H is in cell A1, then no data can b
entered into cell B1....

I think the correct way is to choose Text Length as validatio
factor...

Allow :
Text Length

Data :
Greater Than

Minimum:
=A1=1

Then, if A1 is entered with anything, then Excel will prevent dat
being entered in cell B1
 
Hi gilbert
I tried the formula you shown...but it seems like it is working the
other way round.....in another, if H is in cell A1, then no data can
be entered into cell B1....

This is how i understood the OP. This was my desired result :-)

Frank
 
Back
Top