
Data Validation 97
not 1 or 4, it must be one of the remaining digits. A better way of defining the logic for
Segment 1 would be to check for the presence of digits for which the segment should
come on and not infer their presence by the absence of digits 1 and 4. Such a way of
writing the logic would ensure that the segment displays come on only when a valid
digit is entered. Thus, we should rewrite the formulas for segments numbered 1, 2, 3,
and 7 as follows:
=OR(DIGIT=0,DIGIT=2,DIGIT=3,DIGIT=5,DIGIT=6, for Segment 1,
DIGIT=7,DIGIT=8, DIGIT=9)
=OR(DIGIT=0,DIGIT=1,DIGIT=2,DIGIT=3,DIGIT=4, for Segment 2,
DIGIT=7,DIGIT=8, DIGIT=9)
=OR(DIGIT=0,DIGIT=1,DIGIT=3,DIGIT=4,DIGIT=5, ...