I'm guessing that since you posted in a programming newsgroup, that a
VB
solution would be acceptable. Before giving you code, however, can you
clarify a couple of things please? First, are merged cells in your columns
"paired"? That is, if D5:D10 are merged, then is E5:E10 also merged, or can
E5:E10 be composed of individual cells (or possibly cells merged in a
different pattern than those adjacent to it)? Second, are Columns D and E
the only columns that will have the relationship you described or are there
other paired columns that must be considered?
--
Rick (MVP - Excel)
"Mik" wrote in message
...
My worksheet has cells that contain text - Such as 'INF', 'STO', and
'BAC' etc...
Some of these cells are merged into as many as 9 cells (vertically).
I am trying to prevent the same text being input into the adjacent
single or merged cell (which is offset to the right by ONE cell).
So, if a merged cell comprises of ("D5:D10") and contains the text
'STO',
I want to prevent the user from entering 'STO' in ("E5:E10") etc...
The cells can contain other text, but i want to prevent only 'INF',
'STO', and 'BAC' from being input. All other text is OK.
The cells are currently populated by a Userform ComboBox1.
Can anybody please help?
Thanks
Mik