How to force B1 not equal A1???

  • Thread starter Thread starter Zilla
  • Start date Start date
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?
 
A very quick way to give an alert, but not to prevent, would be to use
Conditional Formatting
best wishes
 
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)
 
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
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top