How to force B1 not equal A1???

Z

Zilla

Any VBA or vanilla excel formula to make the
above check if both A1 and B1 are validated
using the same drop-down list?
 
B

Bernard Liengme

A very quick way to give an alert, but not to prevent, would be to use
Conditional Formatting
best wishes
 
L

Lori

How about selecting A1:B1 then:

Edit > Goto > Special > Data Validation > Same

and check if the selection remains the same. Or in code:

?
Selection.SpecialCells(xlCellTypeSameValidation).Count=Selection.Count

(executed in the immediate window)
 
Z

Zilla

Thanks, but I want it preventive.

Bernard Liengme said:
A very quick way to give an alert, but not to prevent, would be to use
Conditional Formatting
best wishes
 
Z

Zilla

Thanks.

In your first suggestion, what do you mean by "and
check if the selection remains the same"? I did the
Edit->.... procedure to no avail, but this probably
b/c of the mis-interpreted info from you.

With your second suggestion, I just cut/paste what
you typed put it into the VBA editor, and but I still
can choose the same value for both cells off the
drop-down list.

BTW, I said A1/B1, but I really wanted col A/col B.


Lori said:
How about selecting A1:B1 then:

Edit > Goto > Special > Data Validation > Same

and check if the selection remains the same. Or in code:

?
Selection.SpecialCells(xlCellTypeSameValidation).Count=Selection.Count

(executed in the immediate window)
 
Top