I'm not sure about the merged cell (I've not worked with them before), but
for the other range, select the cells in E8:E18 with E8 being the active
cell and then select Custom from the Data Validation dialog box on the
Settings tab and use this formula...
=AND(LEN(E8)=10,LEFT(E8,3)="XL-")
in the Formula field. On the Error Alert tab, make sure that Stop is
selected in the Style field, use a Title something like Invalid Input and
put an message something like the following in the Error Message field...
Your data must start with XL- (X and L being upper case)
and be followed by 7 digits. As an example. XL-1234567
Obviously, change the wording to suit your own personal style.
Rick
>I trying to create a code the will validate my data in a range of
> cells:
[quoted text clipped - 21 lines]
>
> Any suggestions would be greatly appreciated.