Data validation problem

S

Stefi

I want to set a length constraint for a text cell between 1-30 characters,
the cell cannot be empty. Giving 1 for lower limit in Data validation doesn't
prevent the cell to be empty (that is zero length). Giving 2 for lower limit
does prevent the cell to be 1 char long. Any idea how can I set a constraint:
not empty, min 1 char, max 30 char?
 
F

Frank Kabel

Hi
not possible with data validation alone. If you really needs to make sure
that a cell is not left empty before closing the file you'll need vBA code in
the beforesave or beforeclose event
 
D

Debra Dalgleish

Data validation can't prevent a cell from being left empty.

You can use programming to check the cell before the file is closed.

Or, make other key cells dependent on an entry in this cell.
For example: =IF(A2="","Please select a Product Code",E2*F2)
 
S

Stefi

Thanks everybody for the quick response. Nevertheless I think it is a weak
point of Excel.
Stefi
 
Top