View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
CB[_5_] CB[_5_] is offline
external usenet poster
 
Posts: 8
Default Prevent user input, if adjacent cell text is identical

I'm not sure if this will work in your situation (with merged cells &
ComboBox...etc)

Try using Data - Validation - Custom [then enter formula: if(a1=b1)]
You can then customize the Input Message & Error Alert message.

Kind Regards
Charlie.B

Mik wrote:

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