`ZDEMO_EXCEL9`, all values entered in A8 are rejected, whatever B8 contains a "-" or not:  Details of the data validation in cell A8 (Custom, formula `IF(B8<>"";INDIRECT(LEFT(B8;SEARCH("-";B8;1)));EMPTY)`): 